home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file collect/, mode 700 , uid 24632 , gid 0 , size 0 , seconds 5115244306
| default
| |
98%
| file
| data
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 63 6f 6c 6c 65 63 74 2f | 00 00 00 00 00 00 00 00 |collect/|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 30 30 20 00 20 32 34 36 |.... 7|00 . 246|
|00000070| 33 32 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |32 . | 0 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 31 31 35 32 34 34 | 0 | 5115244|
|00000090| 33 30 36 20 20 20 35 34 | 35 34 00 20 00 00 00 00 |306 54|54. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 63 6f 6c 6c 65 63 74 2f | 52 45 41 44 4d 45 00 00 |collect/|README..|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 34 36 |.... 6|00 . 246|
|00000270| 33 32 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |32 . | 0 . |
|00000280| 20 20 31 36 35 37 33 20 | 20 35 31 31 37 32 30 33 | 16573 | 5117203|
|00000290| 31 36 34 20 20 20 36 34 | 35 36 00 20 00 00 00 00 |164 64|56. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 54 68 69 73 20 52 45 41 | 44 4d 45 20 66 69 6c 65 |This REA|DME file|
|00000410| 20 63 6f 6e 73 69 73 74 | 73 20 6f 66 20 74 68 72 | consist|s of thr|
|00000420| 65 65 20 73 65 63 74 69 | 6f 6e 73 2e 20 20 54 68 |ee secti|ons. Th|
|00000430| 65 20 66 69 72 73 74 20 | 73 65 63 74 69 6f 6e 20 |e first |section |
|00000440| 64 65 73 63 72 69 62 65 | 73 20 69 6e 20 61 20 0a |describe|s in a .|
|00000450| 6c 69 74 74 6c 65 20 6d | 6f 72 65 20 64 65 74 61 |little m|ore deta|
|00000460| 69 6c 20 77 68 61 74 20 | 74 68 65 20 70 72 6f 67 |il what |the prog|
|00000470| 72 61 6d 73 20 22 63 6f | 6c 6c 65 63 74 22 20 61 |rams "co|llect" a|
|00000480| 6e 64 20 22 67 65 6e 65 | 72 61 74 6f 72 22 20 64 |nd "gene|rator" d|
|00000490| 6f 2e 20 20 54 68 65 20 | 73 65 63 6f 6e 64 20 0a |o. The |second .|
|000004a0| 73 65 63 74 69 6f 6e 20 | 64 65 73 63 72 69 62 65 |section |describe|
|000004b0| 73 20 74 68 65 20 69 6e | 73 74 61 6c 6c 61 74 69 |s the in|stallati|
|000004c0| 6f 6e 20 6f 66 20 74 68 | 65 20 63 6f 6c 6c 65 63 |on of th|e collec|
|000004d0| 74 69 6f 6e 20 70 61 63 | 6b 61 67 65 2e 20 20 54 |tion pac|kage. T|
|000004e0| 68 65 20 6c 61 73 74 20 | 73 65 63 74 69 6f 6e 0a |he last |section.|
|000004f0| 64 65 73 63 72 69 62 65 | 73 20 61 20 73 61 6d 70 |describe|s a samp|
|00000500| 6c 65 20 63 6f 6c 6c 65 | 63 74 69 6f 6e 20 72 75 |le colle|ction ru|
|00000510| 6e 2e 0a 0a 49 6e 20 74 | 68 65 20 72 65 6c 65 61 |n...In t|he relea|
|00000520| 73 65 20 6e 6f 74 65 20 | 70 6f 73 74 65 64 2c 20 |se note |posted, |
|00000530| 77 65 20 64 69 73 63 75 | 73 73 65 64 20 74 68 65 |we discu|ssed the|
|00000540| 20 69 6d 70 6f 72 74 61 | 6e 63 65 20 6f 66 20 65 | importa|nce of e|
|00000550| 73 74 69 6d 61 74 69 6e | 67 20 6c 6f 73 73 2d 0a |stimatin|g loss-.|
|00000560| 72 61 74 65 20 69 6e 20 | 74 72 61 63 65 20 63 6f |rate in |trace co|
|00000570| 6c 6c 65 63 74 69 6f 6e | 2e 20 20 49 66 20 79 6f |llection|. If yo|
|00000580| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 68 |u do not| have th|
|00000590| 65 20 65 71 75 69 70 6d | 65 6e 74 20 6e 65 63 65 |e equipm|ent nece|
|000005a0| 73 73 61 72 79 20 66 6f | 72 0a 65 73 74 69 6d 61 |ssary fo|r.estima|
|000005b0| 74 69 6e 67 20 6c 6f 73 | 73 2d 72 61 74 65 2c 20 |ting los|s-rate, |
|000005c0| 79 6f 75 20 63 61 6e 20 | 69 67 6e 6f 72 65 20 61 |you can |ignore a|
|000005d0| 6c 6c 20 6d 65 6e 74 69 | 6f 6e 73 20 6f 66 20 74 |ll menti|ons of t|
|000005e0| 68 65 20 22 67 65 6e 65 | 72 61 74 6f 72 22 20 70 |he "gene|rator" p|
|000005f0| 72 6f 67 72 61 6d 20 69 | 6e 0a 74 68 65 20 72 65 |rogram i|n.the re|
|00000600| 73 74 20 6f 66 20 74 68 | 69 73 20 66 69 6c 65 3b |st of th|is file;|
|00000610| 20 77 65 20 77 6f 75 6c | 64 20 73 74 69 6c 6c 20 | we woul|d still |
|00000620| 65 6e 63 6f 75 72 61 67 | 65 20 79 6f 75 20 74 6f |encourag|e you to|
|00000630| 20 63 6f 6c 6c 65 63 74 | 20 64 61 74 61 20 77 68 | collect| data wh|
|00000640| 69 63 68 20 77 65 20 0a | 77 69 6c 6c 20 75 73 65 |ich we .|will use|
|00000650| 20 74 6f 20 73 75 70 70 | 6f 72 74 20 63 6f 6e 63 | to supp|ort conc|
|00000660| 6c 75 73 69 6f 6e 73 20 | 64 72 61 77 6e 20 66 72 |lusions |drawn fr|
|00000670| 6f 6d 20 70 72 69 6d 61 | 72 79 20 74 72 61 63 65 |om prima|ry trace|
|00000680| 73 2e 20 20 0a 0a 4a 65 | 66 66 20 4d 6f 67 75 6c |s. ..Je|ff Mogul|
|00000690| 20 61 6e 64 20 56 65 72 | 6e 20 50 61 78 73 6f 6e | and Ver|n Paxson|
|000006a0| 20 6e 6f 74 69 66 69 65 | 64 20 75 73 20 6f 66 20 | notifie|d us of |
|000006b0| 74 68 65 20 61 62 69 6c | 69 74 79 20 6f 66 20 74 |the abil|ity of t|
|000006c0| 63 70 64 75 6d 70 20 74 | 6f 20 6c 6f 67 20 64 72 |cpdump t|o log dr|
|000006d0| 6f 70 70 65 64 0a 70 61 | 63 6b 65 74 73 20 6f 6e |opped.pa|ckets on|
|000006e0| 20 55 6c 74 72 69 78 20 | 61 6e 64 20 42 53 44 2b | Ultrix |and BSD+|
|000006f0| 42 50 46 20 73 79 73 74 | 65 6d 73 2e 20 20 59 6f |BPF syst|ems. Yo|
|00000700| 75 20 63 61 6e 20 74 75 | 72 6e 20 74 63 70 64 75 |u can tu|rn tcpdu|
|00000710| 6d 70 20 6c 6f 67 67 69 | 6e 67 20 6f 6e 20 61 6e |mp loggi|ng on an|
|00000720| 64 20 0a 69 67 6e 6f 72 | 65 20 61 6c 6c 20 6d 65 |d .ignor|e all me|
|00000730| 6e 74 69 6f 6e 20 6f 66 | 20 22 67 65 6e 65 72 61 |ntion of| "genera|
|00000740| 74 6f 72 22 20 69 6e 20 | 74 68 65 20 72 65 73 74 |tor" in |the rest|
|00000750| 20 6f 66 20 74 68 69 73 | 20 66 69 6c 65 2e 0a 0a | of this| file...|
|00000760| 31 2e 20 44 45 53 43 52 | 49 50 54 49 4f 4e 0a 3d |1. DESCR|IPTION.=|
|00000770| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 0a 22 |========|=====.."|
|00000780| 43 6f 6c 6c 65 63 74 22 | 20 69 73 20 61 20 73 68 |Collect"| is a sh|
|00000790| 65 6c 6c 20 73 63 72 69 | 70 74 20 77 68 69 63 68 |ell scri|pt which|
|000007a0| 20 69 6e 76 6f 6b 65 73 | 20 74 68 65 20 74 63 70 | invokes| the tcp|
|000007b0| 64 75 6d 70 20 70 72 6f | 67 72 61 6d 20 74 6f 20 |dump pro|gram to |
|000007c0| 63 6f 6c 6c 65 63 74 20 | 0a 6e 65 74 77 6f 72 6b |collect |.network|
|000007d0| 20 70 61 63 6b 65 74 20 | 68 65 61 64 65 72 73 2e | packet |headers.|
|000007e0| 20 20 57 65 20 61 72 65 | 20 69 6e 74 65 72 65 73 | We are| interes|
|000007f0| 74 65 64 20 6f 6e 6c 79 | 20 69 6e 20 74 68 65 20 |ted only| in the |
|00000800| 49 50 20 61 6e 64 20 54 | 43 50 20 68 65 61 64 65 |IP and T|CP heade|
|00000810| 72 73 20 6f 66 20 0a 70 | 61 63 6b 65 74 73 20 77 |rs of .p|ackets w|
|00000820| 69 74 68 20 74 68 65 69 | 72 20 54 43 50 20 53 59 |ith thei|r TCP SY|
|00000830| 4e 2c 20 46 49 4e 2c 20 | 6f 72 20 52 53 54 20 66 |N, FIN, |or RST f|
|00000840| 6c 61 67 20 73 65 74 2e | 20 20 20 57 65 20 75 73 |lag set.| We us|
|00000850| 65 20 74 68 65 73 65 20 | 70 61 63 6b 65 74 73 20 |e these |packets |
|00000860| 74 6f 20 0a 64 65 6e 6f | 74 65 20 74 68 65 20 62 |to .deno|te the b|
|00000870| 65 67 69 6e 6e 69 6e 67 | 20 61 6e 64 20 65 6e 64 |eginning| and end|
|00000880| 20 6f 66 20 61 20 54 43 | 50 20 22 63 6f 6e 76 65 | of a TC|P "conve|
|00000890| 72 73 61 74 69 6f 6e 2e | 22 20 54 6f 20 63 6f 6c |rsation.|" To col|
|000008a0| 6c 65 63 74 20 70 61 63 | 6b 65 74 73 2c 20 0a 74 |lect pac|kets, .t|
|000008b0| 63 70 64 75 6d 70 20 70 | 75 74 73 20 74 68 65 20 |cpdump p|uts the |
|000008c0| 65 74 68 65 72 6e 65 74 | 20 69 6e 74 65 72 66 61 |ethernet| interfa|
|000008d0| 63 65 20 69 6e 20 70 72 | 6f 6d 69 73 63 75 6f 75 |ce in pr|omiscuou|
|000008e0| 73 20 6d 6f 64 65 2e 20 | 20 49 74 20 70 61 73 73 |s mode. | It pass|
|000008f0| 65 73 20 74 68 65 20 70 | 61 63 6b 65 74 73 0a 74 |es the p|ackets.t|
|00000900| 68 72 6f 75 67 68 20 61 | 20 75 73 65 72 2d 73 75 |hrough a| user-su|
|00000910| 70 70 6c 69 65 64 20 66 | 69 6c 74 65 72 20 61 6e |pplied f|ilter an|
|00000920| 64 20 63 6f 6c 6c 65 63 | 74 73 20 6f 6e 6c 79 20 |d collec|ts only |
|00000930| 74 68 6f 73 65 20 70 61 | 63 6b 65 74 73 20 74 68 |those pa|ckets th|
|00000940| 61 74 20 63 6f 6d 65 20 | 0a 74 68 72 6f 75 67 68 |at come |.through|
|00000950| 2e 20 20 28 57 65 27 64 | 20 6c 69 6b 65 20 74 6f |. (We'd| like to|
|00000960| 20 74 68 61 6e 6b 20 56 | 65 72 6e 20 50 61 78 73 | thank V|ern Paxs|
|00000970| 6f 6e 20 61 74 20 4c 42 | 4c 20 66 6f 72 20 68 69 |on at LB|L for hi|
|00000980| 73 20 74 63 70 64 75 6d | 70 20 68 65 6c 70 29 2e |s tcpdum|p help).|
|00000990| 0a 0a 54 68 65 20 63 6f | 6c 6c 65 63 74 69 6f 6e |..The co|llection|
|000009a0| 20 72 6f 75 74 69 6e 65 | 20 6d 75 73 74 20 72 75 | routine| must ru|
|000009b0| 6e 20 6f 6e 20 61 20 6d | 61 63 68 69 6e 65 20 63 |n on a m|achine c|
|000009c0| 6f 6e 6e 65 63 74 65 64 | 20 74 6f 20 74 68 65 20 |onnected| to the |
|000009d0| 73 61 6d 65 20 65 74 68 | 65 72 6e 65 74 20 0a 73 |same eth|ernet .s|
|000009e0| 65 67 6d 65 6e 74 20 61 | 73 20 79 6f 75 72 20 73 |egment a|s your s|
|000009f0| 69 74 65 27 73 20 49 6e | 74 65 72 6e 65 74 20 67 |ite's In|ternet g|
|00000a00| 61 74 65 77 61 79 2c 20 | 73 6f 20 74 68 61 74 20 |ateway, |so that |
|00000a10| 61 6c 6c 20 49 6e 74 65 | 72 6e 65 74 20 70 61 63 |all Inte|rnet pac|
|00000a20| 6b 65 74 73 20 63 61 6e | 20 62 65 20 0a 6f 62 73 |kets can| be .obs|
|00000a30| 65 72 76 65 64 2e 0a 0a | 53 69 6e 63 65 20 74 63 |erved...|Since tc|
|00000a40| 70 64 75 6d 70 20 69 73 | 20 6e 6f 74 20 6c 6f 73 |pdump is| not los|
|00000a50| 73 2d 6c 65 73 73 2c 20 | 77 65 20 68 61 76 65 20 |s-less, |we have |
|00000a60| 77 72 69 74 74 65 6e 20 | 74 68 65 20 22 67 65 6e |written |the "gen|
|00000a70| 65 72 61 74 6f 72 22 20 | 70 72 6f 67 72 61 6d 20 |erator" |program |
|00000a80| 74 6f 20 0a 65 73 74 69 | 6d 61 74 65 20 74 68 65 |to .esti|mate the|
|00000a90| 20 6c 6f 73 73 2d 72 61 | 74 65 20 65 78 70 65 72 | loss-ra|te exper|
|00000aa0| 69 65 6e 63 65 64 20 64 | 75 72 69 6e 67 20 63 6f |ienced d|uring co|
|00000ab0| 6c 6c 65 63 74 69 6f 6e | 2e 20 20 47 65 6e 65 72 |llection|. Gener|
|00000ac0| 61 74 6f 72 20 73 65 6e | 64 73 20 61 20 64 61 74 |ator sen|ds a dat|
|00000ad0| 61 20 0a 73 74 72 65 61 | 6d 20 62 65 74 77 65 65 |a .strea|m betwee|
|00000ae0| 6e 20 74 77 6f 20 69 6e | 74 65 72 6e 65 74 20 68 |n two in|ternet h|
|00000af0| 6f 73 74 73 2c 20 62 79 | 20 22 70 69 6e 67 69 6e |osts, by| "pingin|
|00000b00| 67 22 20 61 20 70 72 65 | 2d 73 70 65 63 69 66 69 |g" a pre|-specifi|
|00000b10| 65 64 20 70 6f 72 74 20 | 6f 66 20 61 20 0a 72 65 |ed port |of a .re|
|00000b20| 6d 6f 74 65 20 68 6f 73 | 74 3b 20 74 68 65 73 65 |mote hos|t; these|
|00000b30| 20 70 61 63 6b 65 74 73 | 20 61 72 65 20 64 69 73 | packets| are dis|
|00000b40| 63 61 72 64 65 64 20 62 | 79 20 74 68 65 20 72 65 |carded b|y the re|
|00000b50| 6d 6f 74 65 20 68 6f 73 | 74 2e 20 20 54 68 65 20 |mote hos|t. The |
|00000b60| 69 6e 74 65 72 61 72 72 | 69 76 61 6c 20 0a 74 69 |interarr|ival .ti|
|00000b70| 6d 65 73 20 6f 66 20 74 | 68 65 20 70 69 6e 67 20 |mes of t|he ping |
|00000b80| 70 61 63 6b 65 74 73 20 | 61 72 65 20 65 78 70 6f |packets |are expo|
|00000b90| 6e 65 6e 74 69 61 6c 6c | 79 20 64 69 73 74 72 69 |nentiall|y distri|
|00000ba0| 62 75 74 65 64 2e 20 20 | 54 68 69 73 20 69 6e 2d |buted. |This in-|
|00000bb0| 62 61 6e 64 20 64 61 74 | 61 20 0a 73 74 72 65 61 |band dat|a .strea|
|00000bc0| 6d 20 69 73 20 73 61 6d | 70 6c 65 64 20 62 79 20 |m is sam|pled by |
|00000bd0| 74 68 65 20 63 6f 6c 6c | 65 63 74 69 6f 6e 20 72 |the coll|ection r|
|00000be0| 6f 75 74 69 6e 65 20 74 | 6f 20 65 73 74 69 6d 61 |outine t|o estima|
|00000bf0| 74 65 20 74 68 65 20 6c | 6f 73 73 2d 72 61 74 65 |te the l|oss-rate|
|00000c00| 2e 20 20 0a 4e 65 65 64 | 6c 65 73 73 20 74 6f 20 |. .Need|less to |
|00000c10| 73 61 79 2c 20 74 68 65 | 20 70 61 74 68 20 66 72 |say, the| path fr|
|00000c20| 6f 6d 20 74 68 65 20 6d | 61 63 68 69 6e 65 20 77 |om the m|achine w|
|00000c30| 68 65 72 65 20 22 67 65 | 6e 65 72 61 74 6f 72 22 |here "ge|nerator"|
|00000c40| 20 69 73 20 72 75 6e 6e | 69 6e 67 20 74 6f 20 74 | is runn|ing to t|
|00000c50| 68 65 20 0a 74 61 72 67 | 65 74 20 6d 61 63 68 69 |he .targ|et machi|
|00000c60| 6e 65 20 77 68 65 72 65 | 20 69 74 20 69 73 20 73 |ne where| it is s|
|00000c70| 65 6e 64 69 6e 67 20 70 | 61 63 6b 65 74 73 20 74 |ending p|ackets t|
|00000c80| 6f 20 68 61 73 20 74 6f | 20 74 72 61 76 65 72 73 |o has to| travers|
|00000c90| 65 20 74 68 65 20 65 74 | 68 65 72 6e 65 74 20 0a |e the et|hernet .|
|00000ca0| 73 65 67 6d 65 6e 74 20 | 77 68 65 72 65 20 22 63 |segment |where "c|
|00000cb0| 6f 6c 6c 65 63 74 22 20 | 69 73 20 72 75 6e 6e 69 |ollect" |is runni|
|00000cc0| 6e 67 2c 20 61 6e 64 20 | 74 68 65 79 20 62 6f 74 |ng, and |they bot|
|00000cd0| 68 20 68 61 76 65 20 74 | 6f 20 62 65 20 6f 6e 20 |h have t|o be on |
|00000ce0| 74 68 65 20 73 61 6d 65 | 20 73 75 62 6e 65 74 0a |the same| subnet.|
|00000cf0| 28 53 65 65 20 46 69 67 | 75 72 65 20 31 29 2e 0a |(See Fig|ure 1)..|
|00000d00| 0a 4c 6f 73 73 2d 72 61 | 74 65 20 69 73 20 68 69 |.Loss-ra|te is hi|
|00000d10| 67 68 6c 79 20 64 65 70 | 65 6e 64 65 6e 74 20 6f |ghly dep|endent o|
|00000d20| 6e 20 74 68 65 20 63 6f | 6c 6c 65 63 74 69 6f 6e |n the co|llection|
|00000d30| 20 6d 61 63 68 69 6e 65 | 27 73 20 43 50 55 20 75 | machine|'s CPU u|
|00000d40| 74 69 6c 69 7a 61 74 69 | 6f 6e 2c 20 74 68 75 73 |tilizati|on, thus|
|00000d50| 0a 77 65 20 73 75 67 67 | 65 73 74 20 74 68 61 74 |.we sugg|est that|
|00000d60| 20 74 68 65 20 63 6f 6c | 6c 65 63 74 69 6f 6e 20 | the col|lection |
|00000d70| 62 65 20 72 75 6e 20 6f | 6e 20 61 20 64 65 64 69 |be run o|n a dedi|
|00000d80| 63 61 74 65 64 20 77 6f | 72 6b 73 74 61 74 69 6f |cated wo|rkstatio|
|00000d90| 6e 2e 20 20 46 75 72 74 | 68 65 72 6d 6f 72 65 2c |n. Furt|hermore,|
|00000da0| 0a 73 69 6e 63 65 20 53 | 75 6e 4f 53 27 73 20 6e |.since S|unOS's n|
|00000db0| 69 74 20 69 6e 74 65 72 | 66 61 63 65 20 63 61 6e |it inter|face can|
|00000dc0| 6e 6f 74 20 63 6f 6c 6c | 65 63 74 20 70 61 63 6b |not coll|ect pack|
|00000dd0| 65 74 73 20 67 65 6e 65 | 72 61 74 65 64 20 62 79 |ets gene|rated by|
|00000de0| 20 74 68 65 20 6c 6f 63 | 61 6c 20 0a 6d 61 63 68 | the loc|al .mach|
|00000df0| 69 6e 65 2c 20 74 68 65 | 20 67 65 6e 65 72 61 74 |ine, the| generat|
|00000e00| 6f 72 20 70 72 6f 67 72 | 61 6d 20 68 61 73 20 74 |or progr|am has t|
|00000e10| 6f 20 62 65 20 72 75 6e | 20 6f 6e 20 61 20 6d 61 |o be run| on a ma|
|00000e20| 63 68 69 6e 65 20 73 65 | 70 61 72 61 74 65 20 66 |chine se|parate f|
|00000e30| 72 6f 6d 20 74 68 65 20 | 6f 6e 65 20 0a 72 75 6e |rom the |one .run|
|00000e40| 6e 69 6e 67 20 63 6f 6c | 6c 65 63 74 20 28 53 65 |ning col|lect (Se|
|00000e50| 65 20 46 69 67 75 72 65 | 20 31 29 2e 0a 0a 20 20 |e Figure| 1)... |
|00000e60| 20 20 20 20 20 20 20 20 | 20 20 20 3d 3d 3d 3d 3d | | =====|
|00000e70| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000e80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000e90| 3d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |=. | |
|00000ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000eb0| 20 7c 7c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | ||. | |
|00000ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ed0| 20 20 20 7c 7c 0a 20 20 | 20 20 20 20 20 20 20 20 | ||. | |
|00000ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ef0| 20 20 20 2b 2d 2d 2d 2d | 2b 0a 20 20 20 20 20 20 | +----|+. |
|00000f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f10| 20 20 20 20 20 20 20 7c | 20 47 57 20 7c 0a 20 20 | || GW |. |
|00000f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f30| 20 20 20 20 20 20 20 20 | 20 20 20 2b 2d 2d 2d 2d | | +----|
|00000f40| 2b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |+. | |
|00000f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f60| 20 20 7c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | |. | |
|00000f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f80| 20 20 20 20 7c 0a 20 20 | 20 20 20 20 20 20 20 20 | |. | |
|00000f90| 20 20 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -----|--------|
|00000fa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000fb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000fc0| 2d 2d 2d 2d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |----. | |
|00000fd0| 20 20 20 20 20 20 7c 20 | 20 20 20 20 20 20 20 20 | | | |
|00000fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7c 20 | | | |
|00000ff0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001000| 7c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 ||. | |
|00001010| 20 20 20 7c 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |
|00001020| 20 20 20 20 20 20 20 20 | 20 20 20 7c 20 20 20 20 | | | |
|00001030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7c 0a 20 | | |. |
|00001040| 20 20 20 20 20 20 20 20 | 20 20 20 2b 2d 2d 2d 2d | | +----|
|00001050| 2d 2d 2d 2d 2d 2b 20 20 | 20 20 20 20 20 20 20 20 |-----+ | |
|00001060| 20 20 20 20 2b 2d 2d 2d | 2d 2d 2d 2d 2b 20 20 20 | +---|----+ |
|00001070| 20 20 20 20 20 20 2b 2d | 2d 2d 2d 2d 2d 2d 2d 2d | +-|--------|
|00001080| 2b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 7c 67 |+. | |g|
|00001090| 65 6e 65 72 61 74 6f 72 | 7c 20 20 20 20 20 20 20 |enerator|| |
|000010a0| 20 20 20 20 20 20 20 7c | 63 6f 6c 6c 65 63 74 7c | ||collect||
|000010b0| 20 20 20 20 20 20 20 20 | 20 7c 67 65 6e 65 72 61 | | |genera|
|000010c0| 74 6f 72 7c 0a 20 20 20 | 20 20 20 20 20 20 20 20 |tor|. | |
|000010d0| 20 7c 20 73 6f 75 72 63 | 65 3a 20 7c 20 20 20 20 | | sourc|e: | |
|000010e0| 20 20 20 20 20 20 20 20 | 20 20 7c 20 68 6f 73 74 | | | host|
|000010f0| 3a 20 7c 20 20 20 20 20 | 20 20 20 20 7c 20 74 61 |: | | | ta|
|00001100| 72 67 65 74 3a 20 7c 0a | 20 20 20 20 20 20 20 20 |rget: |.| |
|00001110| 20 20 20 20 7c 20 20 20 | 6b 6f 73 20 20 20 7c 20 | | |kos | |
|00001120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7c 63 61 | | |ca|
|00001130| 6c 64 65 72 61 7c 20 20 | 20 20 20 20 20 20 20 7c |ldera| | ||
|00001140| 20 20 78 61 6e 61 64 75 | 20 20 7c 0a 20 20 20 20 | xanadu| |. |
|00001150| 20 20 20 20 20 20 20 20 | 2b 2d 2d 2d 2d 2d 2d 2d | |+-------|
|00001160| 2d 2d 2b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |--+ | |
|00001170| 20 2b 2d 2d 2d 2d 2d 2d | 2d 2b 20 20 20 20 20 20 | +------|-+ |
|00001180| 20 20 20 2b 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2b 0a 0a | +----|-----+..|
|00001190| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011a0| 46 69 67 2e 20 31 3a 20 | 45 78 61 6d 70 6c 65 20 |Fig. 1: |Example |
|000011b0| 63 6f 6c 6c 65 63 74 69 | 6f 6e 20 72 75 6e 20 73 |collecti|on run s|
|000011c0| 65 74 75 70 2e 0a 0a 0a | 32 2e 20 49 4e 53 54 41 |etup....|2. INSTA|
|000011d0| 4c 4c 41 54 49 4f 4e 0a | 3d 3d 3d 3d 3d 3d 3d 3d |LLATION.|========|
|000011e0| 3d 3d 3d 3d 3d 3d 3d 0a | 49 6e 20 74 68 65 20 73 |=======.|In the s|
|000011f0| 61 6d 65 20 64 69 72 65 | 63 74 6f 72 79 20 61 73 |ame dire|ctory as|
|00001200| 20 74 68 69 73 20 52 45 | 41 44 4d 45 20 66 69 6c | this RE|ADME fil|
|00001210| 65 2c 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 73 65 |e, you s|hould se|
|00001220| 65 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |e the fo|llowing |
|00001230| 66 69 6c 65 73 3a 0a 0a | 20 20 20 20 20 31 37 38 |files:..| 178|
|00001240| 20 4d 61 6b 65 66 69 6c | 65 0a 20 20 20 20 32 35 | Makefil|e. 25|
|00001250| 37 30 20 63 6f 6c 6c 65 | 63 74 2a 0a 20 20 20 20 |70 colle|ct*. |
|00001260| 32 31 37 31 20 63 6f 6c | 6c 65 63 74 2e 31 0a 20 |2171 col|lect.1. |
|00001270| 20 20 20 31 33 39 39 20 | 67 65 6e 65 72 61 74 6f | 1399 |generato|
|00001280| 72 2e 31 0a 20 20 20 20 | 39 38 38 33 20 67 65 6e |r.1. |9883 gen|
|00001290| 65 72 61 74 6f 72 2e 63 | 0a 0a 54 68 65 20 66 69 |erator.c|..The fi|
|000012a0| 6c 65 73 20 22 63 6f 6c | 6c 65 63 74 2e 31 22 20 |les "col|lect.1" |
|000012b0| 61 6e 64 20 22 67 65 6e | 65 72 61 74 6f 72 2e 31 |and "gen|erator.1|
|000012c0| 22 20 61 72 65 20 74 68 | 65 20 6d 61 6e 75 61 6c |" are th|e manual|
|000012d0| 20 70 61 67 65 73 20 66 | 6f 72 20 22 63 6f 6c 6c | pages f|or "coll|
|000012e0| 65 63 74 22 20 61 6e 64 | 0a 22 67 65 6e 65 72 61 |ect" and|."genera|
|000012f0| 74 6f 72 2c 22 20 72 65 | 73 70 65 63 74 69 76 65 |tor," re|spective|
|00001300| 6c 79 2e 20 20 0a 0a 22 | 4d 61 6b 65 66 69 6c 65 |ly. .."|Makefile|
|00001310| 22 20 69 73 20 74 68 65 | 20 6d 61 6b 65 66 69 6c |" is the| makefil|
|00001320| 65 20 66 6f 72 20 22 67 | 65 6e 65 72 61 74 6f 72 |e for "g|enerator|
|00001330| 2e 22 20 20 59 6f 75 20 | 6e 65 65 64 20 74 6f 20 |." You |need to |
|00001340| 72 75 6e 20 6d 61 6b 65 | 28 31 29 20 74 6f 20 63 |run make|(1) to c|
|00001350| 72 65 61 74 65 20 0a 74 | 68 65 20 22 67 65 6e 65 |reate .t|he "gene|
|00001360| 72 61 74 6f 72 22 20 70 | 72 6f 67 72 61 6d 2e 0a |rator" p|rogram..|
|00001370| 0a 22 43 6f 6c 6c 65 63 | 74 22 20 69 73 20 74 68 |."Collec|t" is th|
|00001380| 65 20 73 68 65 6c 6c 2d | 73 63 72 69 70 74 20 74 |e shell-|script t|
|00001390| 68 61 74 20 63 61 6c 6c | 73 20 74 63 70 64 75 6d |hat call|s tcpdum|
|000013a0| 70 2e 20 20 49 66 20 79 | 6f 75 20 68 61 76 65 20 |p. If y|ou have |
|000013b0| 74 63 70 64 75 6d 70 2d | 32 2e 30 0a 69 6e 73 74 |tcpdump-|2.0.inst|
|000013c0| 61 6c 6c 65 64 2c 20 74 | 68 65 6e 20 79 6f 75 72 |alled, t|hen your|
|000013d0| 20 69 6e 73 74 61 6c 6c | 61 74 69 6f 6e 20 69 73 | install|ation is|
|000013e0| 20 63 6f 6d 70 6c 65 74 | 65 2e 20 20 49 66 20 79 | complet|e. If y|
|000013f0| 6f 75 20 64 6f 6e 27 74 | 20 68 61 76 65 20 74 63 |ou don't| have tc|
|00001400| 70 64 75 6d 70 0a 69 6e | 73 74 61 6c 6c 65 64 2c |pdump.in|stalled,|
|00001410| 20 68 6f 77 65 76 65 72 | 2c 20 79 6f 75 20 6e 65 | however|, you ne|
|00001420| 65 64 20 74 6f 20 66 74 | 70 20 69 74 20 66 72 6f |ed to ft|p it fro|
|00001430| 6d 20 74 68 65 20 73 61 | 6d 65 20 70 6c 61 63 65 |m the sa|me place|
|00001440| 20 79 6f 75 20 67 6f 74 | 20 74 68 69 73 20 0a 63 | you got| this .c|
|00001450| 6f 6c 6c 65 63 74 69 6f | 6e 20 70 61 63 6b 61 67 |ollectio|n packag|
|00001460| 65 2e 20 20 4f 6e 63 65 | 20 79 6f 75 20 66 74 70 |e. Once| you ftp|
|00001470| 2d 65 64 20 69 74 2c 20 | 79 6f 75 20 68 61 76 65 |-ed it, |you have|
|00001480| 20 74 6f 20 72 75 6e 20 | 6d 61 6b 65 28 31 29 20 | to run |make(1) |
|00001490| 69 6e 20 74 68 65 0a 74 | 63 70 64 75 6d 70 20 64 |in the.t|cpdump d|
|000014a0| 69 72 65 63 74 6f 72 79 | 20 74 6f 20 63 72 65 61 |irectory| to crea|
|000014b0| 74 65 20 69 74 2e 0a 0a | 33 2e 43 4f 4c 4c 45 43 |te it...|3.COLLEC|
|000014c0| 54 49 4f 4e 0a 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |TION.===|========|
|000014d0| 3d 0a 0a 54 68 65 72 65 | 20 61 72 65 20 74 77 6f |=..There| are two|
|000014e0| 20 73 74 65 70 73 20 74 | 6f 20 61 20 63 6f 6c 6c | steps t|o a coll|
|000014f0| 65 63 74 69 6f 6e 20 72 | 75 6e 3a 0a 0a 31 2e 20 |ection r|un:..1. |
|00001500| 49 66 20 79 6f 75 20 61 | 72 65 20 72 75 6e 6e 69 |If you a|re runni|
|00001510| 6e 67 20 6f 6e 20 53 75 | 6e 4f 53 20 61 6e 64 20 |ng on Su|nOS and |
|00001520| 77 61 6e 74 20 74 6f 20 | 64 6f 20 6c 6f 73 73 2d |want to |do loss-|
|00001530| 72 61 74 65 20 65 73 74 | 69 6d 61 74 69 6f 6e 2c |rate est|imation,|
|00001540| 20 72 75 6e 20 74 68 65 | 20 0a 20 20 20 22 67 65 | run the| . "ge|
|00001550| 6e 65 72 61 74 6f 72 22 | 20 70 72 6f 67 72 61 6d |nerator"| program|
|00001560| 20 61 74 20 74 68 65 20 | 22 67 65 6e 5f 73 72 63 | at the |"gen_src|
|00001570| 22 20 6d 61 63 68 69 6e | 65 20 28 55 6c 74 72 69 |" machin|e (Ultri|
|00001580| 78 20 61 6e 64 20 42 53 | 44 2b 42 50 46 20 73 79 |x and BS|D+BPF sy|
|00001590| 73 74 65 6d 73 0a 20 20 | 20 61 6c 6c 6f 77 20 74 |stems. | allow t|
|000015a0| 63 70 64 75 6d 70 20 74 | 6f 20 6c 6f 67 20 64 72 |cpdump t|o log dr|
|000015b0| 6f 70 70 65 64 20 70 61 | 63 6b 65 74 73 2e 20 20 |opped pa|ckets. |
|000015c0| 4d 61 6b 65 20 73 75 72 | 65 20 79 6f 75 20 74 75 |Make sur|e you tu|
|000015d0| 72 6e 20 6c 6f 67 67 69 | 6e 20 6f 6e 2e 29 3a 0a |rn loggi|n on.):.|
|000015e0| 0a 20 20 20 20 20 20 20 | 67 65 6e 5f 73 72 63 25 |. |gen_src%|
|000015f0| 20 6e 6f 68 75 70 20 67 | 65 6e 65 72 61 74 6f 72 | nohup g|enerator|
|00001600| 20 2d 68 20 67 65 6e 5f | 74 61 72 67 65 74 20 26 | -h gen_|target &|
|00001610| 0a 0a 20 20 20 45 78 61 | 6d 70 6c 65 3a 0a 0a 20 |.. Exa|mple:.. |
|00001620| 20 20 20 20 20 20 6b 6f | 73 2e 75 73 63 2e 65 64 | ko|s.usc.ed|
|00001630| 75 25 20 6e 6f 68 75 70 | 20 67 65 6e 65 72 61 74 |u% nohup| generat|
|00001640| 6f 72 20 2d 68 20 78 61 | 6e 61 64 75 2e 75 73 63 |or -h xa|nadu.usc|
|00001650| 2e 65 64 75 20 26 0a 0a | 20 20 20 4e 6f 74 65 3a |.edu &..| Note:|
|00001660| 0a 20 20 20 2a 20 54 68 | 65 20 22 67 65 6e 65 72 |. * Th|e "gener|
|00001670| 61 74 6f 72 22 20 70 72 | 6f 67 72 61 6d 20 73 68 |ator" pr|ogram sh|
|00001680| 6f 75 6c 64 20 62 65 20 | 72 75 6e 20 6f 6e 20 61 |ould be |run on a|
|00001690| 20 6d 61 63 68 69 6e 65 | 20 73 65 70 61 72 61 74 | machine| separat|
|000016a0| 65 20 66 72 6f 6d 20 74 | 68 65 20 64 61 74 61 20 |e from t|he data |
|000016b0| 0a 20 20 20 20 20 63 6f | 6c 6c 65 63 74 69 6f 6e |. co|llection|
|000016c0| 20 6d 61 63 68 69 6e 65 | 20 28 6e 69 74 20 69 6e | machine| (nit in|
|000016d0| 74 65 72 66 61 63 65 20 | 63 61 6e 6e 6f 74 20 63 |terface |cannot c|
|000016e0| 6f 6c 6c 65 63 74 20 70 | 61 63 6b 65 74 73 20 67 |ollect p|ackets g|
|000016f0| 65 6e 65 72 61 74 65 64 | 20 62 79 20 74 68 65 20 |enerated| by the |
|00001700| 0a 20 20 20 20 20 6c 6f | 63 61 6c 20 6d 61 63 68 |. lo|cal mach|
|00001710| 69 6e 65 29 2e 0a 20 20 | 20 2a 20 54 68 65 20 73 |ine).. | * The s|
|00001720| 6f 75 72 63 65 2f 74 61 | 72 67 65 74 20 70 61 69 |ource/ta|rget pai|
|00001730| 72 20 73 68 6f 75 6c 64 | 20 62 65 20 73 65 6c 65 |r should| be sele|
|00001740| 63 74 65 64 20 73 6f 20 | 74 68 61 74 20 62 6f 74 |cted so |that bot|
|00001750| 68 20 61 72 65 20 6f 6e | 20 74 68 65 20 73 61 6d |h are on| the sam|
|00001760| 65 0a 20 20 20 20 20 73 | 75 62 2d 6e 65 74 20 74 |e. s|ub-net t|
|00001770| 68 65 20 70 61 63 6b 65 | 74 73 20 67 65 6e 65 72 |he packe|ts gener|
|00001780| 61 74 65 64 20 77 69 6c | 6c 20 74 72 61 76 65 72 |ated wil|l traver|
|00001790| 73 65 20 74 68 65 20 65 | 74 68 65 72 6e 65 74 20 |se the e|thernet |
|000017a0| 73 65 67 6d 65 6e 74 20 | 6f 6e 20 77 68 69 63 68 |segment |on which|
|000017b0| 0a 20 20 20 20 20 74 68 | 65 20 63 6f 6c 6c 65 63 |. th|e collec|
|000017c0| 74 69 6f 6e 20 70 72 6f | 67 72 61 6d 20 69 73 20 |tion pro|gram is |
|000017d0| 72 75 6e 6e 69 6e 67 2e | 0a 20 20 20 2a 20 54 68 |running.|. * Th|
|000017e0| 69 73 20 70 72 6f 67 72 | 61 6d 20 74 61 6b 65 73 |is progr|am takes|
|000017f0| 20 76 65 72 79 20 6c 69 | 74 74 6c 65 20 43 50 55 | very li|ttle CPU|
|00001800| 20 74 69 6d 65 2c 20 69 | 74 20 73 68 6f 75 6c 64 | time, i|t should|
|00001810| 20 6e 6f 74 20 69 6d 70 | 61 63 74 20 74 68 65 20 | not imp|act the |
|00001820| 73 79 73 74 65 6d 20 0a | 20 20 20 20 20 6c 6f 61 |system .| loa|
|00001830| 64 20 6f 66 20 74 68 65 | 20 6d 61 63 68 69 6e 65 |d of the| machine|
|00001840| 20 69 74 20 69 73 20 72 | 75 6e 20 6f 6e 2e 0a 20 | it is r|un on.. |
|00001850| 20 20 2a 20 49 66 20 79 | 6f 75 20 77 61 6e 74 20 | * If y|ou want |
|00001860| 74 6f 20 63 6f 6c 6c 65 | 63 74 20 74 72 61 63 65 |to colle|ct trace|
|00001870| 73 20 66 6f 72 20 6d 6f | 72 65 20 74 68 61 6e 20 |s for mo|re than |
|00001880| 74 68 65 20 64 65 66 61 | 75 6c 74 20 32 34 20 68 |the defa|ult 24 h|
|00001890| 6f 75 72 73 2c 20 75 73 | 65 20 74 68 65 20 0a 20 |ours, us|e the . |
|000018a0| 20 20 20 20 2d 64 20 6f | 70 74 69 6f 6e 20 74 6f | -d o|ption to|
|000018b0| 20 73 70 65 63 69 66 79 | 20 74 68 65 20 63 6f 72 | specify| the cor|
|000018c0| 72 65 73 70 6f 6e 64 69 | 6e 67 20 72 75 6e 6e 69 |respondi|ng runni|
|000018d0| 6e 67 20 74 69 6d 65 20 | 66 6f 72 20 22 67 65 6e |ng time |for "gen|
|000018e0| 65 72 61 74 6f 72 2e 22 | 0a 20 20 20 2a 20 49 66 |erator."|. * If|
|000018f0| 20 79 6f 75 20 68 61 76 | 65 20 74 6f 20 6b 69 6c | you hav|e to kil|
|00001900| 6c 20 22 67 65 6e 65 72 | 61 74 6f 72 22 20 62 65 |l "gener|ator" be|
|00001910| 66 6f 72 65 20 69 74 73 | 20 64 75 72 61 74 69 6f |fore its| duratio|
|00001920| 6e 20 72 75 6e 73 20 6f | 75 74 2c 20 75 73 65 20 |n runs o|ut, use |
|00001930| 0a 20 20 20 20 20 22 6b | 69 6c 6c 20 2d 31 22 20 |. "k|ill -1" |
|00001940| 74 6f 20 67 69 76 65 20 | 69 74 20 74 69 6d 65 20 |to give |it time |
|00001950| 74 6f 20 63 6c 65 61 6e | 20 75 70 20 61 6e 64 20 |to clean| up and |
|00001960| 77 72 69 74 65 20 6f 75 | 74 20 69 74 73 20 73 74 |write ou|t its st|
|00001970| 61 74 69 73 74 69 63 73 | 2e 0a 20 20 20 20 0a 20 |atistics|.. . |
|00001980| 20 20 20 0a 32 2e 20 52 | 75 6e 20 74 68 65 20 22 | .2. R|un the "|
|00001990| 63 6f 6c 6c 65 63 74 22 | 20 70 72 6f 67 72 61 6d |collect"| program|
|000019a0| 20 61 74 20 74 68 65 20 | 22 63 6f 6c 6c 65 63 74 | at the |"collect|
|000019b0| 22 20 6d 61 63 68 69 6e | 65 2c 20 77 68 69 63 68 |" machin|e, which|
|000019c0| 20 73 68 6f 75 6c 64 20 | 62 65 0a 20 20 20 64 69 | should |be. di|
|000019d0| 66 66 65 72 65 6e 74 20 | 66 72 6f 6d 20 74 68 65 |fferent |from the|
|000019e0| 20 22 67 65 6e 5f 73 72 | 63 22 20 6d 61 63 68 69 | "gen_sr|c" machi|
|000019f0| 6e 65 3a 0a 20 20 0a 20 | 20 20 20 20 20 20 63 6f |ne:. . | co|
|00001a00| 6c 6c 65 63 74 23 20 6e | 6f 68 75 70 20 63 6f 6c |llect# n|ohup col|
|00001a10| 6c 65 63 74 20 2d 70 20 | 67 65 6e 5f 73 72 63 20 |lect -p |gen_src |
|00001a20| 67 65 6e 5f 74 61 72 67 | 65 74 20 6c 6f 63 61 6c |gen_targ|et local|
|00001a30| 6e 65 74 5f 6e 75 6d 62 | 65 72 20 26 0a 0a 20 20 |net_numb|er &.. |
|00001a40| 20 45 78 61 6d 70 6c 65 | 3a 0a 0a 20 20 20 20 20 | Example|:.. |
|00001a50| 20 20 63 61 6c 64 65 72 | 61 2e 75 73 63 2e 65 64 | calder|a.usc.ed|
|00001a60| 75 23 20 6e 6f 68 75 70 | 20 63 6f 6c 6c 65 63 74 |u# nohup| collect|
|00001a70| 20 2d 70 20 6b 6f 73 2e | 75 73 63 2e 65 64 75 20 | -p kos.|usc.edu |
|00001a80| 78 61 6e 61 64 75 2e 75 | 73 63 2e 65 64 75 20 31 |xanadu.u|sc.edu 1|
|00001a90| 32 38 2e 31 32 35 2e 35 | 31 20 26 0a 0a 20 20 20 |28.125.5|1 &.. |
|00001aa0| 4e 6f 74 65 3a 0a 20 20 | 20 2a 20 54 68 65 20 74 |Note:. | * The t|
|00001ab0| 63 70 64 75 6d 70 20 65 | 78 65 63 75 74 61 62 6c |cpdump e|xecutabl|
|00001ac0| 65 20 28 76 65 72 73 69 | 6f 6e 20 32 2e 30 29 20 |e (versi|on 2.0) |
|00001ad0| 6d 75 73 74 20 62 65 20 | 69 6e 20 79 6f 75 72 20 |must be |in your |
|00001ae0| 73 65 61 72 63 68 20 70 | 61 74 68 2e 0a 20 20 20 |search p|ath.. |
|00001af0| 2a 20 54 63 70 64 75 6d | 70 20 64 75 6d 70 73 20 |* Tcpdum|p dumps |
|00001b00| 74 68 65 20 68 65 61 64 | 65 72 73 20 6f 66 20 70 |the head|ers of p|
|00001b10| 61 63 6b 65 74 73 20 6f | 6e 20 61 20 6e 65 74 77 |ackets o|n a netw|
|00001b20| 6f 72 6b 20 69 6e 74 65 | 72 66 61 63 65 20 74 68 |ork inte|rface th|
|00001b30| 61 74 0a 20 20 20 20 20 | 6d 61 74 63 68 20 74 68 |at. |match th|
|00001b40| 65 20 62 6f 6f 6c 65 61 | 6e 20 65 78 70 72 65 73 |e boolea|n expres|
|00001b50| 73 69 6f 6e 2e 20 20 55 | 6e 64 65 72 20 53 75 6e |sion. U|nder Sun|
|00001b60| 4f 53 3a 20 59 6f 75 20 | 6d 75 73 74 20 62 65 20 |OS: You |must be |
|00001b70| 72 6f 6f 74 20 74 6f 20 | 69 6e 76 6f 6b 65 20 0a |root to |invoke .|
|00001b80| 20 20 20 20 20 74 63 70 | 64 75 6d 70 20 6f 72 20 | tcp|dump or |
|00001b90| 69 74 20 6d 75 73 74 20 | 62 65 20 69 6e 73 74 61 |it must |be insta|
|00001ba0| 6c 6c 65 64 20 73 65 74 | 75 69 64 20 74 6f 20 72 |lled set|uid to r|
|00001bb0| 6f 6f 74 2e 20 20 55 6e | 64 65 72 20 55 6c 74 72 |oot. Un|der Ultr|
|00001bc0| 69 78 3a 20 41 6e 79 20 | 75 73 65 72 20 0a 20 20 |ix: Any |user . |
|00001bd0| 20 20 20 63 61 6e 20 69 | 6e 76 6f 6b 65 20 74 63 | can i|nvoke tc|
|00001be0| 70 64 75 6d 70 20 6f 6e | 63 65 20 74 68 65 20 73 |pdump on|ce the s|
|00001bf0| 75 70 65 72 2d 75 73 65 | 72 20 68 61 73 20 65 6e |uper-use|r has en|
|00001c00| 61 62 6c 65 64 20 70 72 | 6f 6d 69 73 63 75 6f 75 |abled pr|omiscuou|
|00001c10| 73 2d 6d 6f 64 65 20 0a | 20 20 20 20 20 6f 70 65 |s-mode .| ope|
|00001c20| 72 61 74 69 6f 6e 20 75 | 73 69 6e 67 20 20 70 66 |ration u|sing pf|
|00001c30| 63 6f 6e 66 69 67 28 38 | 29 2e 20 20 20 55 6e 64 |config(8|). Und|
|00001c40| 65 72 20 42 53 44 3a 20 | 41 63 63 65 73 73 20 69 |er BSD: |Access i|
|00001c50| 73 20 63 6f 6e 74 72 6f | 6c 6c 65 64 20 62 79 20 |s contro|lled by |
|00001c60| 74 68 65 0a 20 20 20 20 | 20 70 65 72 6d 69 73 73 |the. | permiss|
|00001c70| 69 6f 6e 73 20 6f 6e 20 | 2f 64 65 76 2f 62 70 66 |ions on |/dev/bpf|
|00001c80| 30 2c 20 65 74 63 2e 0a | 20 20 20 2a 20 54 68 65 |0, etc..| * The|
|00001c90| 20 6c 6f 63 61 6c 6e 65 | 74 5f 6e 75 6d 62 65 72 | localne|t_number|
|00001ca0| 20 69 73 20 75 73 65 64 | 20 74 6f 20 73 70 65 63 | is used| to spec|
|00001cb0| 69 66 79 20 74 68 65 20 | 66 69 6c 74 65 72 20 66 |ify the |filter f|
|00001cc0| 6f 72 20 64 65 74 65 72 | 6d 69 6e 69 6e 67 0a 20 |or deter|mining. |
|00001cd0| 20 20 20 20 69 6e 74 65 | 72 6e 65 74 77 6f 72 6b | inte|rnetwork|
|00001ce0| 20 74 72 61 66 66 69 63 | 2c 20 69 2e 65 2e 20 70 | traffic|, i.e. p|
|00001cf0| 61 63 6b 65 74 73 20 62 | 65 74 77 65 65 6e 20 68 |ackets b|etween h|
|00001d00| 6f 73 74 73 20 74 68 61 | 74 20 68 61 76 65 20 74 |osts tha|t have t|
|00001d10| 68 69 73 20 6e 75 6d 62 | 65 72 20 61 73 20 0a 20 |his numb|er as . |
|00001d20| 20 20 20 20 70 61 72 74 | 20 6f 66 20 74 68 65 69 | part| of thei|
|00001d30| 72 20 49 50 20 61 64 64 | 72 65 73 73 20 77 69 6c |r IP add|ress wil|
|00001d40| 6c 20 62 65 20 63 6f 6e | 73 69 64 65 72 65 64 20 |l be con|sidered |
|00001d50| 6c 6f 63 61 6c 20 61 72 | 65 61 20 6e 65 74 77 6f |local ar|ea netwo|
|00001d60| 72 6b 20 74 72 61 66 66 | 69 63 20 61 6e 64 0a 20 |rk traff|ic and. |
|00001d70| 20 20 20 20 6e 6f 74 20 | 63 61 70 74 75 72 65 64 | not |captured|
|00001d80| 2e 20 20 46 6f 72 20 61 | 20 63 6c 61 73 73 20 41 |. For a| class A|
|00001d90| 20 6e 65 74 20 6f 6e 6c | 79 20 74 68 65 20 66 69 | net onl|y the fi|
|00001da0| 72 73 74 20 6f 63 74 65 | 74 20 6e 65 65 64 20 62 |rst octe|t need b|
|00001db0| 65 20 73 70 65 63 69 66 | 69 65 64 0a 20 20 20 20 |e specif|ied. |
|00001dc0| 20 28 69 2e 65 2e 20 32 | 36 29 2c 20 66 6f 72 20 | (i.e. 2|6), for |
|00001dd0| 63 6c 61 73 73 20 42 20 | 74 77 6f 20 6f 63 74 65 |class B |two octe|
|00001de0| 74 73 20 28 69 2e 65 2e | 20 31 32 38 2e 31 32 35 |ts (i.e.| 128.125|
|00001df0| 29 2c 20 61 6e 64 20 66 | 6f 72 20 61 20 63 6c 61 |), and f|or a cla|
|00001e00| 73 73 20 43 20 0a 20 20 | 20 20 20 74 68 72 65 65 |ss C . | three|
|00001e10| 20 6f 63 74 65 74 73 20 | 28 69 2e 65 2e 20 31 39 | octets |(i.e. 19|
|00001e20| 32 2e 31 32 2e 31 30 30 | 29 2e 20 20 0a 20 20 20 |2.12.100|). . |
|00001e30| 2a 20 59 6f 75 20 6e 65 | 65 64 20 74 6f 20 73 70 |* You ne|ed to sp|
|00001e40| 65 63 69 66 79 20 74 68 | 65 20 22 2d 70 20 67 65 |ecify th|e "-p ge|
|00001e50| 6e 5f 73 72 63 20 67 65 | 6e 5f 74 61 72 67 65 74 |n_src ge|n_target|
|00001e60| 22 20 6f 70 74 69 6f 6e | 20 6f 6e 6c 79 20 69 66 |" option| only if|
|00001e70| 20 79 6f 75 0a 20 20 20 | 20 20 61 72 65 20 64 6f | you. | are do|
|00001e80| 69 6e 67 20 6c 6f 73 73 | 2d 72 61 74 65 20 65 73 |ing loss|-rate es|
|00001e90| 74 69 6d 61 74 69 6f 6e | 20 75 6e 64 65 72 20 53 |timation| under S|
|00001ea0| 75 6e 4f 53 20 77 2f 20 | 6e 69 74 20 69 6e 74 65 |unOS w/ |nit inte|
|00001eb0| 72 66 61 63 65 2e 0a 20 | 20 20 2a 20 22 43 6f 6c |rface.. | * "Col|
|00001ec0| 6c 65 63 74 22 20 69 73 | 20 73 65 74 75 70 20 74 |lect" is| setup t|
|00001ed0| 6f 20 72 75 6e 20 66 6f | 72 20 32 34 20 68 6f 75 |o run fo|r 24 hou|
|00001ee0| 72 73 2c 20 68 6f 77 65 | 76 65 72 2c 20 77 65 20 |rs, howe|ver, we |
|00001ef0| 77 69 6c 6c 20 61 70 70 | 72 65 63 69 61 74 65 20 |will app|reciate |
|00001f00| 69 74 0a 20 20 20 20 20 | 69 66 20 79 6f 75 20 63 |it. |if you c|
|00001f10| 6f 75 6c 64 20 72 75 6e | 20 69 74 20 66 6f 72 20 |ould run| it for |
|00001f20| 61 20 6c 6f 6e 67 65 72 | 20 64 75 72 61 74 69 6f |a longer| duratio|
|00001f30| 6e 3b 20 61 6e 64 20 69 | 66 20 79 6f 75 20 64 6f |n; and i|f you do|
|00001f40| 2c 20 64 6f 6e 27 74 20 | 66 6f 72 67 65 74 0a 20 |, don't |forget. |
|00001f50| 20 20 20 20 74 6f 20 72 | 75 6e 20 22 67 65 6e 65 | to r|un "gene|
|00001f60| 72 61 74 6f 72 22 20 66 | 6f 72 20 74 68 65 20 63 |rator" f|or the c|
|00001f70| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 70 65 72 |orrespon|ding per|
|00001f80| 69 6f 64 2e 0a 20 20 20 | 2a 20 44 65 70 65 6e 64 |iod.. |* Depend|
|00001f90| 69 6e 67 20 6f 6e 20 74 | 68 65 20 6c 6f 61 64 20 |ing on t|he load |
|00001fa0| 6f 66 20 79 6f 75 72 20 | 6e 65 74 77 6f 72 6b 2c |of your |network,|
|00001fb0| 20 64 69 73 6b 2d 73 70 | 61 63 65 20 72 65 71 75 | disk-sp|ace requ|
|00001fc0| 69 72 65 6d 65 6e 74 20 | 66 6f 72 20 61 20 0a 20 |irement |for a . |
|00001fd0| 20 20 20 20 32 34 2d 68 | 6f 75 72 20 72 75 6e 20 | 24-h|our run |
|00001fe0| 73 68 6f 75 6c 64 20 6e | 6f 74 20 62 65 20 6d 6f |should n|ot be mo|
|00001ff0| 72 65 20 74 68 61 6e 20 | 32 30 4d 42 2e 0a 0a 54 |re than |20MB...T|
|00002000| 68 65 20 63 6f 6c 6c 65 | 63 74 65 64 20 70 61 63 |he colle|cted pac|
|00002010| 6b 65 74 20 68 65 61 64 | 65 72 73 20 61 72 65 20 |ket head|ers are |
|00002020| 73 61 76 65 64 20 69 6e | 20 74 68 65 20 66 69 6c |saved in| the fil|
|00002030| 65 20 3c 68 6f 73 74 6e | 61 6d 65 2d 64 61 74 65 |e <hostn|ame-date|
|00002040| 3e 20 6f 6e 20 74 68 65 | 20 0a 63 6f 6c 6c 65 63 |> on the| .collec|
|00002050| 74 69 6f 6e 20 6d 61 63 | 68 69 6e 65 2e 20 20 54 |tion mac|hine. T|
|00002060| 68 65 20 73 74 61 74 69 | 73 74 69 63 73 20 66 72 |he stati|stics fr|
|00002070| 6f 6d 20 22 67 65 6e 65 | 72 61 74 6f 72 22 20 69 |om "gene|rator" i|
|00002080| 73 20 73 61 76 65 64 20 | 69 6e 20 74 68 65 20 66 |s saved |in the f|
|00002090| 69 6c 65 20 0a 3c 68 6f | 73 74 6e 61 6d 65 3e 20 |ile .<ho|stname> |
|000020a0| 6f 6e 20 74 68 65 20 67 | 65 6e 65 72 61 74 6f 72 |on the g|enerator|
|000020b0| 20 6d 61 63 68 69 6e 65 | 2e 20 20 50 6c 65 61 73 | machine|. Pleas|
|000020c0| 65 20 63 6f 6e 74 61 63 | 74 20 75 73 20 74 6f 20 |e contac|t us to |
|000020d0| 61 72 72 61 6e 67 65 20 | 66 6f 72 20 0a 64 72 6f |arrange |for .dro|
|000020e0| 70 70 69 6e 67 20 6f 66 | 66 20 74 68 65 20 6f 75 |pping of|f the ou|
|000020f0| 74 70 75 74 20 66 69 6c | 65 73 2e 20 20 50 6c 65 |tput fil|es. Ple|
|00002100| 61 73 65 20 6c 65 74 20 | 75 73 20 6b 6e 6f 77 20 |ase let |us know |
|00002110| 61 6c 73 6f 20 69 66 20 | 79 6f 75 20 68 61 76 65 |also if |you have|
|00002120| 20 70 72 6f 62 6c 65 6d | 73 20 0a 77 69 74 68 20 | problem|s .with |
|00002130| 74 68 65 20 63 6f 6c 6c | 65 63 74 69 6f 6e 20 70 |the coll|ection p|
|00002140| 61 63 6b 61 67 65 2e 20 | 20 57 65 20 63 61 6e 20 |ackage. | We can |
|00002150| 62 65 20 63 6f 6e 74 61 | 63 74 65 64 20 61 74 20 |be conta|cted at |
|00002160| 74 72 61 66 66 69 63 40 | 65 78 63 61 6c 69 62 75 |traffic@|excalibu|
|00002170| 72 2e 75 73 63 2e 65 64 | 75 2e 0a 49 66 20 79 6f |r.usc.ed|u..If yo|
|00002180| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 68 |u do not| have th|
|00002190| 65 20 65 71 75 69 70 6d | 65 6e 74 20 6e 65 63 65 |e equipm|ent nece|
|000021a0| 73 73 61 72 79 20 66 6f | 72 0a 65 73 74 69 6d 61 |ssary fo|r.estima|
|000021b0| 74 69 6e 67 20 6c 6f 73 | 73 2d 72 61 74 65 2c 20 |ting los|s-rate, |
|000021c0| 79 6f 75 20 63 61 6e 20 | 69 67 6e 6f 72 65 20 61 |you can |ignore a|
|000021d0| 6c 6c 20 6d 65 6e 74 69 | 6f 6e 73 20 6f 66 20 74 |ll menti|ons of t|
|000021e0| 68 65 20 22 67 65 6e 65 | 72 61 74 6f 72 22 20 70 |he "gene|rator" p|
|000021f0| 72 6f 67 72 61 6d 20 69 | 6e 0a 74 68 65 20 72 65 |rogram i|n.the re|
|00002200| 63 6f 6c 6c 65 63 74 2f | 4d 61 6b 65 66 69 6c 65 |collect/|Makefile|
|00002210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002260| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 34 36 |.... 6|00 . 246|
|00002270| 33 32 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |32 . | 0 . |
|00002280| 20 20 20 20 32 36 32 20 | 20 35 31 31 33 30 33 32 | 262 | 5113032|
|00002290| 37 36 31 20 20 20 37 31 | 36 31 00 20 00 00 00 00 |761 71|61. ....|
|000022a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 23 20 76 65 72 79 20 6d | 69 6e 69 6d 61 6c 20 6d |# very m|inimal m|
|00002410| 61 6b 65 66 69 6c 65 20 | 66 6f 72 20 67 65 6e 65 |akefile |for gene|
|00002420| 72 61 74 6f 72 20 70 72 | 6f 67 72 61 6d 0a 0a 4c |rator pr|ogram..L|
|00002430| 44 46 4c 41 47 53 3d 20 | 2d 6c 6d 0a 43 46 4c 41 |DFLAGS= |-lm.CFLA|
|00002440| 47 53 3d 20 2d 4f 0a 0a | 2e 4b 45 45 50 53 54 41 |GS= -O..|.KEEPSTA|
|00002450| 54 45 3a 0a 0a 67 65 6e | 65 72 61 74 6f 72 3a 09 |TE:..gen|erator:.|
|00002460| 67 65 6e 65 72 61 74 6f | 72 2e 6f 0a 09 24 28 43 |generato|r.o..$(C|
|00002470| 43 29 20 2d 6f 20 24 40 | 20 67 65 6e 65 72 61 74 |C) -o $@| generat|
|00002480| 6f 72 2e 6f 20 24 28 4c | 44 46 4c 41 47 53 29 0a |or.o $(L|DFLAGS).|
|00002490| 0a 63 6c 65 61 6e 3a 0a | 09 72 6d 20 2d 66 20 2a |.clean:.|.rm -f *|
|000024a0| 2e 6f 20 67 65 6e 65 72 | 61 74 6f 72 20 63 6f 72 |.o gener|ator cor|
|000024b0| 65 0a 61 63 68 69 6e 65 | 2e 20 20 50 6c 65 61 73 |e.achine|. Pleas|
|000024c0| 65 20 63 6f 6e 74 61 63 | 74 20 75 73 20 74 6f 20 |e contac|t us to |
|000024d0| 61 72 72 61 6e 67 65 20 | 66 6f 72 20 0a 64 72 6f |arrange |for .dro|
|000024e0| 70 70 69 6e 67 20 6f 66 | 66 20 74 68 65 20 6f 75 |pping of|f the ou|
|000024f0| 74 70 75 74 20 66 69 6c | 65 73 2e 20 20 50 6c 65 |tput fil|es. Ple|
|00002500| 61 73 65 20 6c 65 74 20 | 75 73 20 6b 6e 6f 77 20 |ase let |us know |
|00002510| 61 6c 73 6f 20 69 66 20 | 79 6f 75 20 68 61 76 65 |also if |you have|
|00002520| 20 70 72 6f 62 6c 65 6d | 73 20 0a 77 69 74 68 20 | problem|s .with |
|00002530| 74 68 65 20 63 6f 6c 6c | 65 63 74 69 6f 6e 20 70 |the coll|ection p|
|00002540| 61 63 6b 61 67 65 2e 20 | 20 57 65 20 63 61 6e 20 |ackage. | We can |
|00002550| 62 65 20 63 6f 6e 74 61 | 63 74 65 64 20 61 74 20 |be conta|cted at |
|00002560| 74 72 61 66 66 69 63 40 | 65 78 63 61 6c 69 62 75 |traffic@|excalibu|
|00002570| 72 2e 75 73 63 2e 65 64 | 75 2e 0a 49 66 20 79 6f |r.usc.ed|u..If yo|
|00002580| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 68 |u do not| have th|
|00002590| 65 20 65 71 75 69 70 6d | 65 6e 74 20 6e 65 63 65 |e equipm|ent nece|
|000025a0| 73 73 61 72 79 20 66 6f | 72 0a 65 73 74 69 6d 61 |ssary fo|r.estima|
|000025b0| 74 69 6e 67 20 6c 6f 73 | 73 2d 72 61 74 65 2c 20 |ting los|s-rate, |
|000025c0| 79 6f 75 20 63 61 6e 20 | 69 67 6e 6f 72 65 20 61 |you can |ignore a|
|000025d0| 6c 6c 20 6d 65 6e 74 69 | 6f 6e 73 20 6f 66 20 74 |ll menti|ons of t|
|000025e0| 68 65 20 22 67 65 6e 65 | 72 61 74 6f 72 22 20 70 |he "gene|rator" p|
|000025f0| 72 6f 67 72 61 6d 20 69 | 6e 0a 74 68 65 20 72 65 |rogram i|n.the re|
|00002600| 63 6f 6c 6c 65 63 74 2f | 63 6f 6c 6c 65 63 74 2e |collect/|collect.|
|00002610| 31 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |1.......|........|
|00002620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002660| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 34 36 |.... 6|00 . 246|
|00002670| 33 32 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |32 . | 0 . |
|00002680| 20 20 20 34 31 37 33 20 | 20 35 31 31 37 32 30 33 | 4173 | 5117203|
|00002690| 31 37 32 20 20 20 37 32 | 35 35 00 20 00 00 00 00 |172 72|55. ....|
|000026a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002800| 2e 54 48 20 43 4f 4c 4c | 45 43 54 20 31 20 22 32 |.TH COLL|ECT 1 "2|
|00002810| 32 20 4e 6f 76 65 6d 62 | 65 72 20 31 39 39 31 22 |2 Novemb|er 1991"|
|00002820| 0a 2e 53 48 20 4e 41 4d | 45 0a 63 6f 6c 6c 65 63 |..SH NAM|E.collec|
|00002830| 74 20 5c 2d 20 53 68 65 | 6c 6c 20 73 63 72 69 70 |t \- She|ll scrip|
|00002840| 74 20 74 6f 20 69 6e 76 | 6f 6b 65 20 74 63 70 64 |t to inv|oke tcpd|
|00002850| 75 6d 70 20 70 72 6f 67 | 72 61 6d 20 74 6f 20 63 |ump prog|ram to c|
|00002860| 61 70 74 75 72 65 0a 69 | 6e 74 65 72 6e 65 74 77 |apture.i|nternetw|
|00002870| 6f 72 6b 20 54 43 50 20 | 74 72 61 66 66 69 63 20 |ork TCP |traffic |
|00002880| 69 6e 66 6f 0a 2e 53 48 | 20 53 59 4e 4f 50 53 49 |info..SH| SYNOPSI|
|00002890| 53 0a 2e 42 20 63 6f 6c | 6c 65 63 74 0a 5b 0a 2e |S..B col|lect.[..|
|000028a0| 42 20 5c 2d 64 5c 20 64 | 75 72 61 74 69 6f 6e 0a |B \-d\ d|uration.|
|000028b0| 5d 0a 5b 0a 2e 42 20 5c | 2d 69 5c 20 69 6e 74 65 |].[..B \|-i\ inte|
|000028c0| 72 66 61 63 65 0a 5d 0a | 2e 69 66 20 6e 20 2e 74 |rface.].|.if n .t|
|000028d0| 69 20 2b 35 0a 5b 0a 2e | 42 20 5c 2d 70 5c 20 68 |i +5.[..|B \-p\ h|
|000028e0| 6f 73 74 31 20 68 6f 73 | 74 32 0a 5d 0a 2e 42 20 |ost1 hos|t2.]..B |
|000028f0| 6c 6f 63 61 6c 5f 6e 65 | 74 5f 6e 75 6d 62 65 72 |local_ne|t_number|
|00002900| 0a 2e 53 48 20 44 45 53 | 43 52 49 50 54 49 4f 4e |..SH DES|CRIPTION|
|00002910| 0a 43 6f 6c 6c 65 63 74 | 20 69 73 20 61 20 73 69 |.Collect| is a si|
|00002920| 6d 70 6c 65 20 73 68 65 | 6c 6c 20 73 63 72 69 70 |mple she|ll scrip|
|00002930| 74 20 77 68 69 63 68 20 | 70 61 73 73 65 73 20 74 |t which |passes t|
|00002940| 68 65 20 73 70 65 63 69 | 66 69 65 64 20 6f 70 74 |he speci|fied opt|
|00002950| 69 6f 6e 73 0a 74 6f 20 | 74 68 65 20 74 63 70 64 |ions.to |the tcpd|
|00002960| 75 6d 70 20 70 72 6f 67 | 72 61 6d 2c 20 61 6e 64 |ump prog|ram, and|
|00002970| 20 73 70 65 63 69 66 69 | 65 73 20 61 20 66 69 6c | specifi|es a fil|
|00002980| 74 65 72 20 74 6f 20 63 | 61 70 74 75 72 65 20 64 |ter to c|apture d|
|00002990| 61 74 61 20 61 62 6f 75 | 74 0a 69 6e 74 65 72 6e |ata abou|t.intern|
|000029a0| 65 74 77 6f 72 6b 20 54 | 43 50 20 63 6f 6e 76 65 |etwork T|CP conve|
|000029b0| 72 73 61 74 69 6f 6e 73 | 2c 20 61 6e 64 20 6d 6f |rsations|, and mo|
|000029c0| 6e 69 74 6f 72 20 74 68 | 65 20 69 6e 2d 62 61 6e |nitor th|e in-ban|
|000029d0| 64 20 22 70 69 6e 67 22 | 20 73 74 72 65 61 6d 0a |d "ping"| stream.|
|000029e0| 67 65 6e 65 72 61 74 65 | 64 20 62 79 20 74 68 65 |generate|d by the|
|000029f0| 20 67 65 6e 65 72 61 74 | 6f 72 28 31 29 20 70 72 | generat|or(1) pr|
|00002a00| 6f 67 72 61 6d 2e 20 20 | 54 68 65 20 63 6f 6c 6c |ogram. |The coll|
|00002a10| 65 63 74 69 6f 6e 20 69 | 73 20 61 75 74 6f 6d 61 |ection i|s automa|
|00002a20| 74 69 63 61 6c 6c 79 0a | 74 65 72 6d 69 6e 61 74 |tically.|terminat|
|00002a30| 65 64 20 61 66 74 65 72 | 20 74 68 65 20 73 70 65 |ed after| the spe|
|00002a40| 63 69 66 69 65 64 20 63 | 6f 6c 6c 65 63 74 69 6f |cified c|ollectio|
|00002a50| 6e 20 64 75 72 61 74 69 | 6f 6e 2e 20 20 4f 75 74 |n durati|on. Out|
|00002a60| 70 75 74 20 69 73 20 77 | 72 69 74 74 65 6e 0a 74 |put is w|ritten.t|
|00002a70| 6f 20 61 20 66 69 6c 65 | 20 6e 61 6d 65 64 20 3c |o a file| named <|
|00002a80| 5c 66 49 68 6f 73 74 6e | 61 6d 65 2d 64 61 74 65 |\fIhostn|ame-date|
|00002a90| 5c 66 52 3e 2e 20 20 50 | 6c 65 61 73 65 20 63 6f |\fR>. P|lease co|
|00002aa0| 6e 74 61 63 74 20 75 73 | 2c 20 61 74 20 0a 74 72 |ntact us|, at .tr|
|00002ab0| 61 66 66 69 63 40 65 78 | 63 61 6c 69 62 75 72 2e |affic@ex|calibur.|
|00002ac0| 75 73 63 2e 65 64 75 2c | 20 74 6f 20 61 72 72 61 |usc.edu,| to arra|
|00002ad0| 6e 67 65 20 66 6f 72 20 | 74 68 65 20 64 72 6f 70 |nge for |the drop|
|00002ae0| 20 6f 66 66 20 6f 66 20 | 74 68 69 73 20 66 69 6c | off of |this fil|
|00002af0| 65 2e 0a 2e 53 48 20 4f | 50 54 49 4f 4e 53 0a 2e |e...SH O|PTIONS..|
|00002b00| 54 50 20 38 0a 2d 64 20 | 64 75 72 61 74 69 6f 6e |TP 8.-d |duration|
|00002b10| 0a 53 70 65 63 69 66 79 | 20 74 68 65 20 64 75 72 |.Specify| the dur|
|00002b20| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 63 6f 6c |ation of| the col|
|00002b30| 6c 65 63 74 20 69 6e 20 | 6d 69 6e 75 74 65 73 2e |lect in |minutes.|
|00002b40| 20 20 54 68 65 20 64 65 | 66 61 75 6c 74 20 69 73 | The de|fault is|
|00002b50| 20 31 34 34 30 20 6d 69 | 6e 75 74 65 73 0a 28 32 | 1440 mi|nutes.(2|
|00002b60| 34 20 68 6f 75 72 73 29 | 2e 0a 2e 54 50 0a 2d 69 |4 hours)|...TP.-i|
|00002b70| 20 69 6e 74 65 72 66 61 | 63 65 0a 49 6e 74 65 72 | interfa|ce.Inter|
|00002b80| 66 61 63 65 20 66 6f 72 | 20 74 63 70 64 75 6d 70 |face for| tcpdump|
|00002b90| 20 74 6f 20 6d 6f 6e 69 | 74 6f 72 2c 20 64 65 66 | to moni|tor, def|
|00002ba0| 61 75 6c 74 73 20 74 6f | 20 6c 6f 77 65 73 74 20 |aults to| lowest |
|00002bb0| 6e 75 6d 62 65 72 20 69 | 6e 74 65 72 66 61 63 65 |number i|nterface|
|00002bc0| 2e 0a 2e 54 50 0a 2d 70 | 20 68 6f 73 74 31 20 68 |...TP.-p| host1 h|
|00002bd0| 6f 73 74 32 0a 48 6f 73 | 74 73 20 62 65 74 77 65 |ost2.Hos|ts betwe|
|00002be0| 65 6e 20 77 68 69 63 68 | 20 74 68 65 20 69 6e 2d |en which| the in-|
|00002bf0| 62 61 6e 64 20 22 70 69 | 6e 67 22 20 73 74 72 65 |band "pi|ng" stre|
|00002c00| 61 6d 20 69 73 20 66 6c | 6f 77 69 6e 67 2e 20 20 |am is fl|owing. |
|00002c10| 48 6f 73 74 31 20 73 68 | 6f 75 6c 64 0a 62 65 20 |Host1 sh|ould.be |
|00002c20| 74 68 65 20 68 6f 73 74 | 20 72 75 6e 6e 69 6e 67 |the host| running|
|00002c30| 20 67 65 6e 65 72 61 74 | 6f 72 28 31 29 2c 20 68 | generat|or(1), h|
|00002c40| 6f 73 74 32 20 69 73 20 | 74 68 65 20 72 65 6d 6f |ost2 is |the remo|
|00002c50| 74 65 20 68 6f 73 74 20 | 73 70 65 63 69 66 69 65 |te host |specifie|
|00002c60| 64 20 69 6e 20 74 68 65 | 20 0a 2d 68 20 6f 70 74 |d in the| .-h opt|
|00002c70| 69 6f 6e 20 74 6f 20 67 | 65 6e 65 72 61 74 6f 72 |ion to g|enerator|
|00002c80| 28 31 29 2e 20 20 48 6f | 73 74 31 20 61 6e 64 20 |(1). Ho|st1 and |
|00002c90| 68 6f 73 74 32 20 73 68 | 6f 75 6c 64 20 62 65 20 |host2 sh|ould be |
|00002ca0| 6f 6e 20 74 68 65 20 73 | 61 6d 65 20 73 75 62 6e |on the s|ame subn|
|00002cb0| 65 74 0a 61 6e 64 20 63 | 6f 6e 6e 65 63 74 65 64 |et.and c|onnected|
|00002cc0| 20 74 6f 20 74 68 65 20 | 65 74 68 65 72 6e 65 74 | to the |ethernet|
|00002cd0| 20 73 65 67 6d 65 6e 74 | 20 6f 6e 20 77 68 69 63 | segment| on whic|
|00002ce0| 68 20 63 6f 6c 6c 65 63 | 74 20 69 73 20 72 75 6e |h collec|t is run|
|00002cf0| 6e 69 6e 67 2e 0a 59 6f | 75 20 6e 65 65 64 20 74 |ning..Yo|u need t|
|00002d00| 6f 20 73 70 65 63 69 66 | 79 20 74 68 69 73 20 6f |o specif|y this o|
|00002d10| 70 74 69 6f 6e 20 6f 6e | 6c 79 20 69 66 20 79 6f |ption on|ly if yo|
|00002d20| 75 20 61 72 65 20 64 6f | 69 6e 67 20 6c 6f 73 73 |u are do|ing loss|
|00002d30| 2d 72 61 74 65 20 65 73 | 74 69 6d 61 74 69 6f 6e |-rate es|timation|
|00002d40| 2e 0a 4e 6f 74 65 20 61 | 6c 73 6f 20 74 68 61 74 |..Note a|lso that|
|00002d50| 20 74 63 70 64 75 6d 70 | 28 31 29 20 63 61 6e 20 | tcpdump|(1) can |
|00002d60| 6c 6f 67 20 64 72 6f 70 | 70 65 64 20 70 61 63 6b |log drop|ped pack|
|00002d70| 65 74 73 20 77 68 65 6e | 20 72 75 6e 6e 69 6e 67 |ets when| running|
|00002d80| 20 6f 6e 20 74 68 65 20 | 55 6c 74 72 69 78 0a 6f | on the |Ultrix.o|
|00002d90| 72 20 42 53 44 2b 42 50 | 46 20 6f 70 65 72 61 74 |r BSD+BP|F operat|
|00002da0| 69 6e 67 20 73 79 73 74 | 65 6d 73 2c 20 74 68 75 |ing syst|ems, thu|
|00002db0| 73 20 79 6f 75 20 64 6f | 6e 27 74 20 6e 65 65 64 |s you do|n't need|
|00002dc0| 20 74 6f 20 72 75 6e 20 | 67 65 6e 65 72 61 74 6f | to run |generato|
|00002dd0| 72 28 31 29 20 74 6f 0a | 65 73 74 69 6d 61 74 65 |r(1) to.|estimate|
|00002de0| 20 74 68 65 20 6c 6f 73 | 73 2d 72 61 74 65 20 6f | the los|s-rate o|
|00002df0| 6e 20 74 68 69 73 20 73 | 79 73 74 65 6d 73 2e 0a |n this s|ystems..|
|00002e00| 2e 54 50 0a 6c 6f 63 61 | 6c 6e 65 74 5f 6e 75 6d |.TP.loca|lnet_num|
|00002e10| 62 65 72 0a 54 68 65 20 | 6c 6f 63 61 6c 20 6e 65 |ber.The |local ne|
|00002e20| 74 77 6f 72 6b 20 6e 75 | 6d 62 65 72 2c 20 75 73 |twork nu|mber, us|
|00002e30| 65 64 20 74 6f 20 73 70 | 65 63 69 66 79 20 74 68 |ed to sp|ecify th|
|00002e40| 65 20 66 69 6c 74 65 72 | 20 66 6f 72 20 64 65 74 |e filter| for det|
|00002e50| 65 72 6d 69 6e 69 6e 67 | 0a 69 6e 74 65 72 6e 65 |ermining|.interne|
|00002e60| 74 77 6f 72 6b 20 74 72 | 61 66 66 69 63 2c 20 69 |twork tr|affic, i|
|00002e70| 2e 65 2e 20 70 61 63 6b | 65 74 73 20 62 65 74 77 |.e. pack|ets betw|
|00002e80| 65 65 6e 20 68 6f 73 74 | 73 20 74 68 61 74 20 68 |een host|s that h|
|00002e90| 61 76 65 20 74 68 69 73 | 20 6e 75 6d 62 65 72 0a |ave this| number.|
|00002ea0| 61 73 20 70 61 72 74 20 | 6f 66 20 74 68 65 69 72 |as part |of their|
|00002eb0| 20 49 50 20 61 64 64 72 | 65 73 73 20 77 69 6c 6c | IP addr|ess will|
|00002ec0| 20 62 65 63 6f 6e 73 69 | 64 65 72 65 64 20 6c 6f | beconsi|dered lo|
|00002ed0| 63 61 6c 20 61 72 65 61 | 20 74 72 61 66 66 69 63 |cal area| traffic|
|00002ee0| 20 61 6e 64 0a 6e 6f 74 | 20 62 65 20 63 61 70 74 | and.not| be capt|
|00002ef0| 75 72 65 64 2e 20 20 46 | 6f 72 20 61 20 63 6c 61 |ured. F|or a cla|
|00002f00| 73 73 20 41 20 6e 65 74 | 20 6f 6e 6c 79 20 74 68 |ss A net| only th|
|00002f10| 65 20 66 69 72 73 74 20 | 6f 63 74 65 74 20 6e 65 |e first |octet ne|
|00002f20| 65 64 20 62 65 20 73 70 | 65 63 69 66 69 65 64 0a |ed be sp|ecified.|
|00002f30| 28 69 2e 65 2e 20 32 36 | 29 2c 20 66 6f 72 20 63 |(i.e. 26|), for c|
|00002f40| 6c 61 73 73 20 42 20 74 | 77 6f 20 6f 63 74 65 74 |lass B t|wo octet|
|00002f50| 73 20 28 69 2e 65 2e 20 | 31 32 38 2e 31 32 35 29 |s (i.e. |128.125)|
|00002f60| 2c 20 61 6e 64 20 66 6f | 72 20 61 20 63 6c 61 73 |, and fo|r a clas|
|00002f70| 73 20 43 20 74 68 72 65 | 65 0a 6f 63 74 65 74 73 |s C thre|e.octets|
|00002f80| 20 28 69 2e 65 2e 20 31 | 39 32 2e 31 32 2e 31 30 | (i.e. 1|92.12.10|
|00002f90| 30 29 2e 20 20 0a 2e 53 | 48 20 57 41 52 4e 49 4e |0). ..S|H WARNIN|
|00002fa0| 47 53 0a 2e 50 50 0a 54 | 68 69 73 20 73 63 72 69 |GS..PP.T|his scri|
|00002fb0| 70 74 20 6d 75 73 74 20 | 62 65 20 72 75 6e 20 62 |pt must |be run b|
|00002fc0| 79 20 72 6f 6f 74 20 74 | 6f 20 61 6c 6c 6f 77 20 |y root t|o allow |
|00002fd0| 74 68 65 20 6e 65 74 77 | 6f 72 6b 20 69 6e 74 65 |the netw|ork inte|
|00002fe0| 72 66 61 63 65 20 74 6f | 20 62 65 20 70 75 74 20 |rface to| be put |
|00002ff0| 69 6e 74 6f 0a 70 72 6f | 6d 69 73 63 75 6f 75 73 |into.pro|miscuous|
|00003000| 20 6d 6f 64 65 2e 20 20 | 54 63 70 64 75 6d 70 20 | mode. |Tcpdump |
|00003010| 28 76 65 72 73 69 6f 6e | 20 32 2e 30 29 20 69 73 |(version| 2.0) is|
|00003020| 20 61 6c 73 6f 20 72 65 | 71 75 69 72 65 64 2c 20 | also re|quired, |
|00003030| 61 6e 64 20 6d 75 73 74 | 20 62 65 20 69 6e 20 0a |and must| be in .|
|00003040| 72 6f 6f 74 27 73 20 73 | 65 61 72 63 68 20 70 61 |root's s|earch pa|
|00003050| 74 68 2e 0a 2e 53 48 20 | 53 45 45 20 41 4c 53 4f |th...SH |SEE ALSO|
|00003060| 0a 67 65 6e 65 72 61 74 | 6f 72 28 31 29 2c 20 74 |.generat|or(1), t|
|00003070| 63 70 64 75 6d 70 28 31 | 29 2e 0a 65 74 73 20 74 |cpdump(1|)..ets t|
|00003080| 6f 20 68 61 73 20 74 6f | 20 74 72 61 76 65 72 73 |o has to| travers|
|00003090| 65 20 74 68 65 20 65 74 | 68 65 72 6e 65 74 20 0a |e the et|hernet .|
|000030a0| 73 65 67 6d 65 6e 74 20 | 77 68 65 72 65 20 22 63 |segment |where "c|
|000030b0| 6f 6c 6c 65 63 74 22 20 | 69 73 20 72 75 6e 6e 69 |ollect" |is runni|
|000030c0| 6e 67 2c 20 61 6e 64 20 | 74 68 65 79 20 62 6f 74 |ng, and |they bot|
|000030d0| 68 20 68 61 76 65 20 74 | 6f 20 62 65 20 6f 6e 20 |h have t|o be on |
|000030e0| 74 68 65 20 73 61 6d 65 | 20 73 75 62 6e 65 74 0a |the same| subnet.|
|000030f0| 28 53 65 65 20 46 69 67 | 75 72 65 20 31 29 2e 0a |(See Fig|ure 1)..|
|00003100| 0a 4c 6f 73 73 2d 72 61 | 74 65 20 69 73 20 68 69 |.Loss-ra|te is hi|
|00003110| 67 68 6c 79 20 64 65 70 | 65 6e 64 65 6e 74 20 6f |ghly dep|endent o|
|00003120| 6e 20 74 68 65 20 63 6f | 6c 6c 65 63 74 69 6f 6e |n the co|llection|
|00003130| 20 6d 61 63 68 69 6e 65 | 27 73 20 43 50 55 20 75 | machine|'s CPU u|
|00003140| 74 69 6c 69 7a 61 74 69 | 6f 6e 2c 20 74 68 75 73 |tilizati|on, thus|
|00003150| 0a 77 65 20 73 75 67 67 | 65 73 74 20 74 68 61 74 |.we sugg|est that|
|00003160| 20 74 68 65 20 63 6f 6c | 6c 65 63 74 69 6f 6e 20 | the col|lection |
|00003170| 62 65 20 72 75 6e 20 6f | 6e 20 61 20 64 65 64 69 |be run o|n a dedi|
|00003180| 63 61 74 65 64 20 77 6f | 72 6b 73 74 61 74 69 6f |cated wo|rkstatio|
|00003190| 6e 2e 20 20 46 75 72 74 | 68 65 72 6d 6f 72 65 2c |n. Furt|hermore,|
|000031a0| 0a 73 69 6e 63 65 20 53 | 75 6e 4f 53 27 73 20 6e |.since S|unOS's n|
|000031b0| 69 74 20 69 6e 74 65 72 | 66 61 63 65 20 63 61 6e |it inter|face can|
|000031c0| 6e 6f 74 20 63 6f 6c 6c | 65 63 74 20 70 61 63 6b |not coll|ect pack|
|000031d0| 65 74 73 20 67 65 6e 65 | 72 61 74 65 64 20 62 79 |ets gene|rated by|
|000031e0| 20 74 68 65 20 6c 6f 63 | 61 6c 20 0a 6d 61 63 68 | the loc|al .mach|
|000031f0| 69 6e 65 2c 20 74 68 65 | 20 67 65 6e 65 72 61 74 |ine, the| generat|
|00003200| 63 6f 6c 6c 65 63 74 2f | 63 6f 6c 6c 65 63 74 00 |collect/|collect.|
|00003210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003260| 00 00 00 00 20 20 20 37 | 30 30 20 00 20 32 34 36 |.... 7|00 . 246|
|00003270| 33 32 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |32 . | 0 . |
|00003280| 20 20 20 35 31 32 33 20 | 20 35 31 31 37 32 30 32 | 5123 | 5117202|
|00003290| 37 34 30 20 20 20 37 31 | 31 33 00 20 00 00 00 00 |740 71|13. ....|
|000032a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003400| 23 21 2f 62 69 6e 2f 73 | 68 0a 0a 23 0a 23 20 43 |#!/bin/s|h..#.# C|
|00003410| 6f 70 79 72 69 67 68 74 | 20 28 63 29 20 31 39 39 |opyright| (c) 199|
|00003420| 31 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 20 |1 Univer|sity of |
|00003430| 53 6f 75 74 68 65 72 6e | 20 43 61 6c 69 66 6f 72 |Southern| Califor|
|00003440| 6e 69 61 2e 0a 23 20 41 | 6c 6c 20 72 69 67 68 74 |nia..# A|ll right|
|00003450| 73 20 72 65 73 65 72 76 | 65 64 2e 0a 23 0a 23 20 |s reserv|ed..#.# |
|00003460| 52 65 64 69 73 74 72 69 | 62 75 74 69 6f 6e 20 61 |Redistri|bution a|
|00003470| 6e 64 20 75 73 65 20 69 | 6e 20 73 6f 75 72 63 65 |nd use i|n source|
|00003480| 20 61 6e 64 20 62 69 6e | 61 72 79 20 66 6f 72 6d | and bin|ary form|
|00003490| 73 20 61 72 65 20 70 65 | 72 6d 69 74 74 65 64 0a |s are pe|rmitted.|
|000034a0| 23 20 70 72 6f 76 69 64 | 65 64 20 74 68 61 74 20 |# provid|ed that |
|000034b0| 74 68 65 20 61 62 6f 76 | 65 20 63 6f 70 79 72 69 |the abov|e copyri|
|000034c0| 67 68 74 20 6e 6f 74 69 | 63 65 20 61 6e 64 20 74 |ght noti|ce and t|
|000034d0| 68 69 73 20 70 61 72 61 | 67 72 61 70 68 20 61 72 |his para|graph ar|
|000034e0| 65 0a 23 20 64 75 70 6c | 69 63 61 74 65 64 20 69 |e.# dupl|icated i|
|000034f0| 6e 20 61 6c 6c 20 73 75 | 63 68 20 66 6f 72 6d 73 |n all su|ch forms|
|00003500| 20 61 6e 64 20 74 68 61 | 74 20 61 6e 79 20 64 6f | and tha|t any do|
|00003510| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 2c 0a 23 20 61 |cumentat|ion,.# a|
|00003520| 64 76 65 72 74 69 73 69 | 6e 67 20 6d 61 74 65 72 |dvertisi|ng mater|
|00003530| 69 61 6c 73 2c 20 61 6e | 64 20 6f 74 68 65 72 20 |ials, an|d other |
|00003540| 6d 61 74 65 72 69 61 6c | 73 20 72 65 6c 61 74 65 |material|s relate|
|00003550| 64 20 74 6f 20 73 75 63 | 68 0a 23 20 64 69 73 74 |d to suc|h.# dist|
|00003560| 72 69 62 75 74 69 6f 6e | 20 61 6e 64 20 75 73 65 |ribution| and use|
|00003570| 20 61 63 6b 6e 6f 77 6c | 65 64 67 65 20 74 68 61 | acknowl|edge tha|
|00003580| 74 20 74 68 65 20 73 6f | 66 74 77 61 72 65 20 77 |t the so|ftware w|
|00003590| 61 73 20 64 65 76 65 6c | 6f 70 65 64 0a 23 20 62 |as devel|oped.# b|
|000035a0| 79 20 74 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |y the Un|iversity|
|000035b0| 20 6f 66 20 53 6f 75 74 | 68 65 72 6e 20 43 61 6c | of Sout|hern Cal|
|000035c0| 69 66 6f 72 6e 69 61 2e | 20 54 68 65 20 6e 61 6d |ifornia.| The nam|
|000035d0| 65 20 6f 66 20 74 68 65 | 20 55 6e 69 76 65 72 73 |e of the| Univers|
|000035e0| 69 74 79 20 0a 23 20 6d | 61 79 20 6e 6f 74 20 62 |ity .# m|ay not b|
|000035f0| 65 20 75 73 65 64 20 74 | 6f 20 65 6e 64 6f 72 73 |e used t|o endors|
|00003600| 65 20 6f 72 20 70 72 6f | 6d 6f 74 65 20 70 72 6f |e or pro|mote pro|
|00003610| 64 75 63 74 73 20 64 65 | 72 69 76 65 64 20 66 72 |ducts de|rived fr|
|00003620| 6f 6d 20 74 68 69 73 20 | 0a 23 20 73 6f 66 74 77 |om this |.# softw|
|00003630| 61 72 65 20 77 69 74 68 | 6f 75 74 20 73 70 65 63 |are with|out spec|
|00003640| 69 66 69 63 20 70 72 69 | 6f 72 20 77 72 69 74 74 |ific pri|or writt|
|00003650| 65 6e 20 70 65 72 6d 69 | 73 73 69 6f 6e 2e 0a 23 |en permi|ssion..#|
|00003660| 20 54 48 49 53 20 53 4f | 46 54 57 41 52 45 20 49 | THIS SO|FTWARE I|
|00003670| 53 20 50 52 4f 56 49 44 | 45 44 20 60 60 41 53 20 |S PROVID|ED ``AS |
|00003680| 49 53 27 27 20 41 4e 44 | 20 57 49 54 48 4f 55 54 |IS'' AND| WITHOUT|
|00003690| 20 41 4e 59 20 45 58 50 | 52 45 53 53 20 4f 52 0a | ANY EXP|RESS OR.|
|000036a0| 23 20 49 4d 50 4c 49 45 | 44 20 57 41 52 52 41 4e |# IMPLIE|D WARRAN|
|000036b0| 54 49 45 53 2c 20 49 4e | 43 4c 55 44 49 4e 47 2c |TIES, IN|CLUDING,|
|000036c0| 20 57 49 54 48 4f 55 54 | 20 4c 49 4d 49 54 41 54 | WITHOUT| LIMITAT|
|000036d0| 49 4f 4e 2c 20 54 48 45 | 20 49 4d 50 4c 49 45 44 |ION, THE| IMPLIED|
|000036e0| 0a 23 20 57 41 52 52 41 | 4e 54 49 45 53 20 4f 46 |.# WARRA|NTIES OF|
|000036f0| 20 4d 45 52 43 48 41 4e | 54 49 42 49 4c 49 54 59 | MERCHAN|TIBILITY|
|00003700| 20 41 4e 44 20 46 49 54 | 4e 45 53 53 20 46 4f 52 | AND FIT|NESS FOR|
|00003710| 20 41 20 50 41 52 54 49 | 43 55 4c 41 52 20 50 55 | A PARTI|CULAR PU|
|00003720| 52 50 4f 53 45 2e 0a 23 | 0a 0a 23 0a 23 20 24 4c |RPOSE..#|..#.# $L|
|00003730| 6f 67 3a 20 63 6f 6c 6c | 65 63 74 2c 76 20 24 0a |og: coll|ect,v $.|
|00003740| 23 20 52 65 76 69 73 69 | 6f 6e 20 31 2e 34 20 20 |# Revisi|on 1.4 |
|00003750| 31 39 39 31 2f 31 32 2f | 30 34 20 20 31 36 3a 34 |1991/12/|04 16:4|
|00003760| 32 3a 32 35 20 20 6a 61 | 6d 69 6e 0a 23 20 61 64 |2:25 ja|min.# ad|
|00003770| 64 20 64 61 74 65 20 74 | 6f 20 6f 75 74 70 75 74 |d date t|o output|
|00003780| 20 66 69 6c 65 6e 61 6d | 65 2e 0a 23 0a 23 20 52 | filenam|e..#.# R|
|00003790| 65 76 69 73 69 6f 6e 20 | 31 2e 33 20 20 31 39 39 |evision |1.3 199|
|000037a0| 31 2f 31 31 2f 32 38 20 | 20 31 39 3a 30 30 3a 31 |1/11/28 | 19:00:1|
|000037b0| 34 20 20 6a 61 6d 69 6e | 0a 23 20 72 65 70 6c 61 |4 jamin|.# repla|
|000037c0| 63 65 20 6e 6f 6e 2d 70 | 6f 72 74 61 62 6c 65 20 |ce non-p|ortable |
|000037d0| 73 68 69 66 74 20 78 20 | 77 69 74 68 20 73 68 69 |shift x |with shi|
|000037e0| 66 74 27 73 2e 0a 23 20 | 72 65 70 6c 61 63 65 20 |ft's..# |replace |
|000037f0| 6e 6f 6e 2d 70 6f 72 74 | 61 62 6c 65 20 61 74 20 |non-port|able at |
|00003800| 6e 6f 77 2b 64 75 72 61 | 74 69 6f 6e 20 77 69 74 |now+dura|tion wit|
|00003810| 68 20 73 6c 65 65 70 2e | 0a 23 20 54 68 61 6e 6b |h sleep.|.# Thank|
|00003820| 73 20 74 6f 20 4a 65 66 | 66 20 4d 6f 67 75 6c 2e |s to Jef|f Mogul.|
|00003830| 0a 23 0a 23 20 52 65 76 | 69 73 69 6f 6e 20 31 2e |.#.# Rev|ision 1.|
|00003840| 32 20 20 31 39 39 31 2f | 31 31 2f 32 32 20 20 30 |2 1991/|11/22 0|
|00003850| 36 3a 35 37 3a 31 33 20 | 20 6a 61 6d 69 6e 0a 23 |6:57:13 | jamin.#|
|00003860| 20 73 61 76 65 64 20 63 | 6f 6c 6c 65 63 74 65 64 | saved c|ollected|
|00003870| 20 6f 75 74 70 75 74 20 | 74 6f 20 61 20 66 69 6c | output |to a fil|
|00003880| 65 20 6e 61 6d 65 64 20 | 3c 68 6f 73 74 6e 61 6d |e named |<hostnam|
|00003890| 65 3e 0a 23 0a 23 20 76 | 65 72 73 69 6f 6e 20 31 |e>.#.# v|ersion 1|
|000038a0| 2e 30 09 64 2e 6a 2e 6d | 69 74 7a 65 6c 20 39 2f |.0.d.j.m|itzel 9/|
|000038b0| 32 34 2f 39 31 0a 23 20 | 75 73 65 20 74 63 70 64 |24/91.# |use tcpd|
|000038c0| 75 6d 70 20 74 6f 20 63 | 6f 6c 6c 65 63 74 20 61 |ump to c|ollect a|
|000038d0| 6c 6c 20 74 63 70 20 53 | 59 4e 2c 20 46 49 4e 2c |ll tcp S|YN, FIN,|
|000038e0| 20 61 6e 64 20 52 53 54 | 20 70 61 63 6b 65 74 73 | and RST| packets|
|000038f0| 2e 20 20 6f 75 74 70 75 | 74 20 69 73 0a 23 20 77 |. outpu|t is.# w|
|00003900| 72 69 74 74 65 6e 20 74 | 6f 20 74 68 65 20 66 69 |ritten t|o the fi|
|00003910| 6c 65 20 27 63 6f 6c 6c | 65 63 74 2e 6f 75 74 27 |le 'coll|ect.out'|
|00003920| 2e 20 20 74 68 65 20 63 | 6f 6c 6c 65 63 74 20 69 |. the c|ollect i|
|00003930| 73 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 0a |s automa|tically.|
|00003940| 23 20 73 74 6f 70 70 65 | 64 20 61 66 74 65 72 20 |# stoppe|d after |
|00003950| 65 78 65 63 75 74 69 6e | 67 20 66 6f 72 20 74 68 |executin|g for th|
|00003960| 65 20 73 70 65 63 69 66 | 69 65 64 20 74 69 6d 65 |e specif|ied time|
|00003970| 20 64 75 72 61 74 69 6f | 6e 20 28 64 65 66 61 75 | duratio|n (defau|
|00003980| 6c 74 20 3d 20 31 34 34 | 30 0a 23 20 6d 69 6e 75 |lt = 144|0.# minu|
|00003990| 74 65 73 20 3d 20 32 34 | 20 68 72 73 29 2e 0a 23 |tes = 24| hrs)..#|
|000039a0| 0a 0a 55 53 41 47 45 3d | 22 55 73 61 67 65 3a 20 |..USAGE=|"Usage: |
|000039b0| 63 6f 6c 6c 65 63 74 20 | 5b 2d 64 20 64 75 72 61 |collect |[-d dura|
|000039c0| 74 69 6f 6e 5f 6d 69 6e | 5d 20 5b 2d 69 20 69 6e |tion_min|] [-i in|
|000039d0| 74 65 72 66 61 63 65 5d | 0a 09 5b 2d 70 20 68 6f |terface]|..[-p ho|
|000039e0| 73 74 31 20 68 6f 73 74 | 32 5d 20 6c 6f 63 61 6c |st1 host|2] local|
|000039f0| 6e 65 74 5f 6e 75 6d 62 | 65 72 22 0a 20 0a 23 0a |net_numb|er". .#.|
|00003a00| 23 20 69 6e 69 74 69 61 | 6c 69 7a 65 20 6c 6f 63 |# initia|lize loc|
|00003a10| 61 6c 20 76 61 72 69 61 | 62 6c 65 73 0a 23 0a 44 |al varia|bles.#.D|
|00003a20| 55 52 41 54 49 4f 4e 3d | 27 31 34 34 30 27 0a 4f |URATION=|'1440'.O|
|00003a30| 50 54 49 4f 4e 53 3d 27 | 27 0a 4c 4f 43 41 4c 4e |PTIONS='|'.LOCALN|
|00003a40| 45 54 3d 27 27 0a 50 49 | 4e 47 5f 46 49 4c 54 45 |ET=''.PI|NG_FILTE|
|00003a50| 52 3d 27 27 0a 48 4f 53 | 54 4e 41 4d 45 3d 60 2f |R=''.HOS|TNAME=`/|
|00003a60| 62 69 6e 2f 68 6f 73 74 | 6e 61 6d 65 60 2d 60 64 |bin/host|name`-`d|
|00003a70| 61 74 65 20 7c 20 61 77 | 6b 20 27 7b 20 70 72 69 |ate | aw|k '{ pri|
|00003a80| 6e 74 66 28 22 25 73 2d | 25 64 2d 25 64 22 2c 20 |ntf("%s-|%d-%d", |
|00003a90| 24 32 2c 20 24 33 2c 20 | 24 4e 46 29 20 7d 27 60 |$2, $3, |$NF) }'`|
|00003aa0| 0a 0a 23 0a 23 20 70 61 | 72 73 65 20 63 6f 6d 6d |..#.# pa|rse comm|
|00003ab0| 61 6e 64 20 6c 69 6e 65 | 20 6f 70 74 69 6f 6e 73 |and line| options|
|00003ac0| 0a 23 0a 77 68 69 6c 65 | 20 5b 20 24 23 20 2d 67 |.#.while| [ $# -g|
|00003ad0| 74 20 31 20 5d 20 3b 20 | 64 6f 0a 20 20 20 20 63 |t 1 ] ; |do. c|
|00003ae0| 61 73 65 20 24 31 20 69 | 6e 0a 09 2d 64 29 09 44 |ase $1 i|n..-d).D|
|00003af0| 55 52 41 54 49 4f 4e 3d | 22 24 32 22 0a 09 09 73 |URATION=|"$2"...s|
|00003b00| 68 69 66 74 3b 20 73 68 | 69 66 74 20 0a 09 09 3b |hift; sh|ift ...;|
|00003b10| 3b 0a 20 20 20 20 20 20 | 20 20 2d 69 29 20 20 20 |;. | -i) |
|00003b20| 20 20 4f 50 54 49 4f 4e | 53 3d 22 24 4f 50 54 49 | OPTION|S="$OPTI|
|00003b30| 4f 4e 53 20 2d 69 20 24 | 32 22 0a 20 20 20 20 20 |ONS -i $|2". |
|00003b40| 20 20 20 20 20 20 20 20 | 20 20 20 73 68 69 66 74 | | shift|
|00003b50| 3b 20 73 68 69 66 74 0a | 20 20 20 20 20 20 20 20 |; shift.| |
|00003b60| 20 20 20 20 20 20 20 20 | 3b 3b 0a 20 20 20 20 20 | |;;. |
|00003b70| 20 20 20 2d 70 29 20 20 | 20 20 20 50 49 4e 47 5f | -p) | PING_|
|00003b80| 46 49 4c 54 45 52 3d 22 | 6f 72 20 28 75 64 70 20 |FILTER="|or (udp |
|00003b90| 64 73 74 20 70 6f 72 74 | 20 64 69 73 63 61 72 64 |dst port| discard|
|00003ba0| 20 61 6e 64 20 28 73 72 | 63 20 68 6f 73 74 20 24 | and (sr|c host $|
|00003bb0| 32 20 61 6e 64 20 64 73 | 74 20 68 6f 73 74 20 24 |2 and ds|t host $|
|00003bc0| 33 29 29 22 0a 20 20 20 | 20 20 20 20 20 20 20 20 |3))". | |
|00003bd0| 20 20 20 20 20 73 68 69 | 66 74 3b 20 73 68 69 66 | shi|ft; shif|
|00003be0| 74 3b 20 73 68 69 66 74 | 0a 20 20 20 20 20 20 20 |t; shift|. |
|00003bf0| 20 20 20 20 20 20 20 20 | 20 3b 3b 0a 20 20 20 20 | | ;;. |
|00003c00| 20 20 20 20 2a 29 20 20 | 20 20 20 20 62 72 65 61 | *) | brea|
|00003c10| 6b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |k. | |
|00003c20| 20 20 3b 3b 0a 20 20 20 | 20 65 73 61 63 0a 64 6f | ;;. | esac.do|
|00003c30| 6e 65 0a 0a 23 0a 23 20 | 6d 61 6b 65 20 73 75 72 |ne..#.# |make sur|
|00003c40| 65 20 6f 6e 6c 79 20 6f | 6e 65 20 70 61 72 61 6d |e only o|ne param|
|00003c50| 65 74 65 72 20 72 65 6d | 61 69 6e 73 0a 23 20 61 |eter rem|ains.# a|
|00003c60| 73 73 75 6d 65 20 74 68 | 69 73 20 70 61 72 61 6d |ssume th|is param|
|00003c70| 65 74 65 72 20 74 6f 20 | 62 65 20 74 68 65 20 6c |eter to |be the l|
|00003c80| 6f 63 61 6c 20 6e 65 74 | 77 6f 72 6b 20 6e 75 6d |ocal net|work num|
|00003c90| 62 65 72 0a 23 0a 69 66 | 20 5b 20 24 23 20 2d 6e |ber.#.if| [ $# -n|
|00003ca0| 65 20 31 20 5d 20 3b 20 | 74 68 65 6e 0a 20 20 20 |e 1 ] ; |then. |
|00003cb0| 20 65 63 68 6f 20 24 31 | 20 24 32 20 24 33 20 24 | echo $1| $2 $3 $|
|00003cc0| 34 20 0a 20 20 20 20 65 | 63 68 6f 20 24 55 53 41 |4 . e|cho $USA|
|00003cd0| 47 45 20 31 3e 26 32 0a | 20 20 20 20 65 78 69 74 |GE 1>&2.| exit|
|00003ce0| 20 31 0a 65 6c 73 65 0a | 20 20 20 20 4c 4f 43 41 | 1.else.| LOCA|
|00003cf0| 4c 4e 45 54 3d 24 31 0a | 66 69 0a 0a 23 0a 23 20 |LNET=$1.|fi..#.# |
|00003d00| 73 70 65 63 69 66 79 20 | 74 68 65 20 74 63 70 64 |specify |the tcpd|
|00003d10| 75 6d 70 20 66 69 6c 74 | 65 72 20 63 6f 6d 6d 61 |ump filt|er comma|
|00003d20| 6e 64 20 61 6e 64 20 65 | 78 65 63 75 74 65 20 69 |nd and e|xecute i|
|00003d30| 6e 20 74 68 65 20 62 61 | 63 6b 67 72 6f 75 6e 64 |n the ba|ckground|
|00003d40| 0a 23 0a 74 63 70 64 75 | 6d 70 20 2d 77 20 24 48 |.#.tcpdu|mp -w $H|
|00003d50| 4f 53 54 4e 41 4d 45 20 | 24 4f 50 54 49 4f 4e 53 |OSTNAME |$OPTIONS|
|00003d60| 20 5c 28 5c 28 74 63 70 | 5c 5b 31 33 5c 5d 20 5c | \(\(tcp|\[13\] \|
|00003d70| 26 20 37 20 5c 21 5c 3d | 20 30 5c 29 20 61 6e 64 |& 7 \!\=| 0\) and|
|00003d80| 20 5c 28 6e 6f 74 20 5c | 28 73 72 63 20 61 6e 64 | \(not \|(src and|
|00003d90| 20 64 73 74 20 6e 65 74 | 20 24 4c 4f 43 41 4c 4e | dst net| $LOCALN|
|00003da0| 45 54 5c 29 5c 29 5c 29 | 20 24 50 49 4e 47 5f 46 |ET\)\)\)| $PING_F|
|00003db0| 49 4c 54 45 52 20 3e 20 | 24 48 4f 53 54 4e 41 4d |ILTER > |$HOSTNAM|
|00003dc0| 45 2e 6c 6f 67 20 26 0a | 0a 23 0a 23 20 73 63 68 |E.log &.|.#.# sch|
|00003dd0| 65 64 75 6c 65 20 74 68 | 65 20 63 6f 6c 6c 65 63 |edule th|e collec|
|00003de0| 74 20 70 72 6f 63 65 73 | 73 20 74 6f 20 62 65 20 |t proces|s to be |
|00003df0| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 20 6b 69 |automati|cally ki|
|00003e00| 6c 6c 65 64 20 61 66 74 | 65 72 20 74 68 65 0a 23 |lled aft|er the.#|
|00003e10| 20 73 70 65 63 69 66 69 | 65 64 20 63 6f 6c 6c 65 | specifi|ed colle|
|00003e20| 63 74 20 64 75 72 61 74 | 69 6f 6e 0a 23 0a 73 6c |ct durat|ion.#.sl|
|00003e30| 65 65 70 20 60 65 78 70 | 72 20 36 30 20 5c 2a 20 |eep `exp|r 60 \* |
|00003e40| 24 44 55 52 41 54 49 4f | 4e 60 0a 6b 69 6c 6c 20 |$DURATIO|N`.kill |
|00003e50| 24 21 0a 69 67 75 72 65 | 20 31 29 2e 0a 0a 20 20 |$!.igure| 1)... |
|00003e60| 20 20 20 20 20 20 20 20 | 20 20 20 3d 3d 3d 3d 3d | | =====|
|00003e70| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003e80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003e90| 3d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |=. | |
|00003ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003eb0| 20 7c 7c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | ||. | |
|00003ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ed0| 20 20 20 7c 7c 0a 20 20 | 20 20 20 20 20 20 20 20 | ||. | |
|00003ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ef0| 20 20 20 2b 2d 2d 2d 2d | 2b 0a 20 20 20 20 20 20 | +----|+. |
|00003f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f10| 20 20 20 20 20 20 20 7c | 20 47 57 20 7c 0a 20 20 | || GW |. |
|00003f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f30| 20 20 20 20 20 20 20 20 | 20 20 20 2b 2d 2d 2d 2d | | +----|
|00003f40| 2b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |+. | |
|00003f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f60| 20 20 7c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | |. | |
|00003f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f80| 20 20 20 20 7c 0a 20 20 | 20 20 20 20 20 20 20 20 | |. | |
|00003f90| 20 20 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -----|--------|
|00003fa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003fb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003fc0| 2d 2d 2d 2d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |----. | |
|00003fd0| 20 20 20 20 20 20 7c 20 | 20 20 20 20 20 20 20 20 | | | |
|00003fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7c 20 | | | |
|00003ff0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004000| 63 6f 6c 6c 65 63 74 2f | 67 65 6e 65 72 61 74 6f |collect/|generato|
|00004010| 72 2e 31 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |r.1.....|........|
|00004020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004060| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 34 36 |.... 6|00 . 246|
|00004070| 33 32 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |32 . | 0 . |
|00004080| 20 20 20 32 35 36 37 20 | 20 35 31 31 33 32 37 30 | 2567 | 5113270|
|00004090| 35 33 34 20 20 20 37 36 | 32 35 00 20 00 00 00 00 |534 76|25. ....|
|000040a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004200| 2e 54 48 20 47 45 4e 45 | 52 41 54 4f 52 20 31 20 |.TH GENE|RATOR 1 |
|00004210| 22 32 32 20 4e 6f 76 65 | 6d 62 65 72 20 31 39 39 |"22 Nove|mber 199|
|00004220| 31 22 0a 2e 53 48 20 4e | 41 4d 45 0a 67 65 6e 65 |1"..SH N|AME.gene|
|00004230| 72 61 74 6f 72 20 5c 2d | 20 53 69 6d 70 6c 65 20 |rator \-| Simple |
|00004240| 72 61 6e 64 6f 6d 20 55 | 44 50 20 74 72 61 66 66 |random U|DP traff|
|00004250| 69 63 20 67 65 6e 65 72 | 61 74 69 6f 6e 20 70 72 |ic gener|ation pr|
|00004260| 6f 67 72 61 6d 0a 2e 53 | 48 20 53 59 4e 4f 50 53 |ogram..S|H SYNOPS|
|00004270| 49 53 0a 2e 42 20 67 65 | 6e 65 72 61 74 6f 72 0a |IS..B ge|nerator.|
|00004280| 5b 0a 2e 42 20 5c 2d 68 | 5c 20 72 65 6d 6f 74 65 |[..B \-h|\ remote|
|00004290| 5f 68 6f 73 74 0a 5d 0a | 5b 0a 2e 42 20 5c 2d 70 |_host.].|[..B \-p|
|000042a0| 5c 20 72 65 6d 6f 74 65 | 5f 70 6f 72 74 0a 5d 0a |\ remote|_port.].|
|000042b0| 2e 69 66 20 6e 20 2e 74 | 69 20 2b 37 0a 5b 0a 2e |.if n .t|i +7.[..|
|000042c0| 42 20 5c 2d 64 5c 20 64 | 75 72 61 74 69 6f 6e 0a |B \-d\ d|uration.|
|000042d0| 5d 0a 5b 0a 2e 42 20 5c | 2d 6d 5c 20 6d 65 61 6e |].[..B \|-m\ mean|
|000042e0| 5f 69 6e 74 65 72 61 72 | 72 69 76 61 6c 0a 5d 0a |_interar|rival.].|
|000042f0| 2e 53 48 20 44 45 53 43 | 52 49 50 54 49 4f 4e 0a |.SH DESC|RIPTION.|
|00004300| 54 68 69 73 20 70 72 6f | 67 72 61 6d 20 67 65 6e |This pro|gram gen|
|00004310| 65 72 61 74 65 73 20 55 | 44 50 20 70 61 63 6b 65 |erates U|DP packe|
|00004320| 74 73 20 62 65 74 77 65 | 65 6e 20 74 68 65 20 6c |ts betwe|en the l|
|00004330| 6f 63 61 6c 20 68 6f 73 | 74 20 61 6e 64 20 74 68 |ocal hos|t and th|
|00004340| 65 20 72 65 6d 6f 74 65 | 20 68 6f 73 74 2e 0a 54 |e remote| host..T|
|00004350| 68 65 20 69 6e 74 65 72 | 61 72 72 69 76 61 6c 20 |he inter|arrival |
|00004360| 74 69 6d 65 73 20 6f 66 | 20 70 61 63 6b 65 74 73 |times of| packets|
|00004370| 20 61 72 65 20 65 78 70 | 6f 6e 65 6e 74 69 61 6c | are exp|onential|
|00004380| 6c 79 20 64 69 73 74 72 | 69 62 75 74 65 64 20 77 |ly distr|ibuted w|
|00004390| 69 74 68 20 74 68 65 20 | 0a 73 70 65 63 69 66 69 |ith the |.specifi|
|000043a0| 65 64 20 6d 65 61 6e 5f | 69 6e 74 65 72 61 72 72 |ed mean_|interarr|
|000043b0| 69 76 61 6c 2e 0a 54 68 | 65 20 67 65 6e 65 72 61 |ival..Th|e genera|
|000043c0| 74 65 64 20 74 72 61 66 | 66 69 63 20 73 74 72 65 |ted traf|fic stre|
|000043d0| 61 6d 20 63 61 6e 20 62 | 65 20 73 61 6d 70 6c 65 |am can b|e sample|
|000043e0| 64 20 62 79 20 61 20 64 | 61 74 61 20 63 6f 6c 6c |d by a d|ata coll|
|000043f0| 65 63 74 69 6f 6e 20 70 | 72 6f 67 72 61 6d 2c 0a |ection p|rogram,.|
|00004400| 65 2e 67 2e 20 63 6f 6c | 6c 65 63 74 28 31 29 2c |e.g. col|lect(1),|
|00004410| 20 74 6f 20 65 6d 70 69 | 72 69 63 61 6c 6c 79 20 | to empi|rically |
|00004420| 64 65 74 65 72 6d 69 6e | 65 20 74 68 65 20 6c 6f |determin|e the lo|
|00004430| 73 73 2d 72 61 74 65 20 | 6f 66 20 74 68 65 20 63 |ss-rate |of the c|
|00004440| 6f 6c 6c 65 63 74 69 6f | 6e 20 72 75 6e 2e 0a 54 |ollectio|n run..T|
|00004450| 68 65 20 73 74 61 74 69 | 73 74 69 63 73 20 6f 66 |he stati|stics of|
|00004460| 20 61 20 67 65 6e 65 72 | 61 74 6f 72 20 72 75 6e | a gener|ator run|
|00004470| 20 69 73 20 77 72 69 74 | 74 65 6e 20 74 6f 20 61 | is writ|ten to a|
|00004480| 20 66 69 6c 65 20 6e 61 | 6d 65 64 20 3c 5c 66 49 | file na|med <\fI|
|00004490| 68 6f 73 74 6e 61 6d 65 | 5c 66 52 3e 2e 20 20 0a |hostname|\fR>. .|
|000044a0| 50 6c 65 61 73 65 20 63 | 6f 6e 74 61 63 74 20 75 |Please c|ontact u|
|000044b0| 73 2c 20 61 74 20 74 72 | 61 66 66 69 63 40 65 78 |s, at tr|affic@ex|
|000044c0| 63 61 6c 69 62 75 72 2e | 75 73 63 2e 65 64 75 2c |calibur.|usc.edu,|
|000044d0| 20 74 6f 20 61 72 72 61 | 6e 67 65 20 66 6f 72 20 | to arra|nge for |
|000044e0| 74 68 65 20 64 72 6f 70 | 20 6f 66 66 20 0a 6f 66 |the drop| off .of|
|000044f0| 20 74 68 69 73 20 66 69 | 6c 65 2e 0a 0a 2e 53 48 | this fi|le....SH|
|00004500| 20 4f 50 54 49 4f 4e 53 | 0a 2e 54 50 20 38 0a 2d | OPTIONS|..TP 8.-|
|00004510| 68 20 72 65 6d 6f 74 65 | 5f 68 6f 73 74 0a 48 6f |h remote|_host.Ho|
|00004520| 73 74 20 74 6f 20 73 65 | 6e 64 20 67 65 6e 65 72 |st to se|nd gener|
|00004530| 61 74 65 64 20 70 61 63 | 6b 65 74 73 20 74 6f 2e |ated pac|kets to.|
|00004540| 20 20 44 65 66 61 75 6c | 74 20 69 73 20 6c 6f 63 | Defaul|t is loc|
|00004550| 61 6c 68 6f 73 74 2e 0a | 2e 54 50 0a 2d 70 20 72 |alhost..|.TP.-p r|
|00004560| 65 6d 6f 74 65 5f 70 6f | 72 74 0a 50 6f 72 74 20 |emote_po|rt.Port |
|00004570| 6e 75 6d 62 65 72 20 74 | 6f 20 73 65 6e 64 20 67 |number t|o send g|
|00004580| 65 6e 65 72 61 74 65 64 | 20 70 61 63 6b 65 74 73 |enerated| packets|
|00004590| 20 74 6f 20 6f 6e 20 72 | 65 6d 6f 74 65 20 68 6f | to on r|emote ho|
|000045a0| 73 74 2e 20 20 44 65 66 | 61 75 6c 74 20 69 73 20 |st. Def|ault is |
|000045b0| 39 20 5b 44 49 53 43 41 | 52 44 5d 2e 0a 2e 54 50 |9 [DISCA|RD]...TP|
|000045c0| 0a 2d 64 20 64 75 72 61 | 74 69 6f 6e 0a 53 70 65 |.-d dura|tion.Spe|
|000045d0| 63 69 66 79 20 74 68 65 | 20 64 75 72 61 74 69 6f |cify the| duratio|
|000045e0| 6e 20 6f 66 20 67 65 6e | 65 72 61 74 65 72 27 73 |n of gen|erater's|
|000045f0| 20 72 75 6e 2c 20 69 6e | 20 6d 69 6e 75 74 65 73 | run, in| minutes|
|00004600| 2e 20 20 54 68 65 20 64 | 65 66 61 75 6c 74 20 69 |. The d|efault i|
|00004610| 73 20 0a 31 34 34 35 20 | 6d 69 6e 75 74 65 73 20 |s .1445 |minutes |
|00004620| 28 32 34 20 68 6f 75 72 | 73 20 61 6e 64 20 35 20 |(24 hour|s and 5 |
|00004630| 6d 69 6e 75 74 65 73 29 | 2e 0a 2e 54 50 0a 2d 6d |minutes)|...TP.-m|
|00004640| 20 6d 65 61 6e 5f 69 6e | 74 65 72 61 72 72 69 76 | mean_in|terarriv|
|00004650| 61 6c 0a 4d 65 61 6e 20 | 69 6e 74 65 72 61 72 72 |al.Mean |interarr|
|00004660| 69 76 61 6c 20 28 69 6e | 20 73 65 63 6f 6e 64 73 |ival (in| seconds|
|00004670| 29 20 6f 66 20 74 68 65 | 20 67 65 6e 65 72 61 74 |) of the| generat|
|00004680| 65 64 20 70 61 63 6b 65 | 74 73 2e 20 20 44 65 66 |ed packe|ts. Def|
|00004690| 61 75 6c 74 20 69 73 20 | 31 0a 73 65 63 6f 6e 64 |ault is |1.second|
|000046a0| 2e 0a 2e 53 48 20 57 41 | 52 4e 49 4e 47 0a 2e 50 |...SH WA|RNING..P|
|000046b0| 50 0a 53 70 65 63 69 66 | 79 69 6e 67 20 61 6e 20 |P.Specif|ying an |
|000046c0| 75 6e 75 73 65 64 20 70 | 6f 72 74 20 6f 6e 20 74 |unused p|ort on t|
|000046d0| 68 65 20 72 65 6d 6f 74 | 65 20 6d 61 63 68 69 6e |he remot|e machin|
|000046e0| 65 20 63 61 6e 20 72 65 | 73 75 6c 74 20 69 6e 20 |e can re|sult in |
|000046f0| 61 0a 70 72 6f 6c 69 66 | 65 72 61 74 69 6f 6e 20 |a.prolif|eration |
|00004700| 6f 66 20 49 43 4d 50 20 | 22 61 64 64 72 65 73 73 |of ICMP |"address|
|00004710| 20 75 6e 61 76 61 69 6c | 61 62 6c 65 22 20 6d 65 | unavail|able" me|
|00004720| 73 73 61 67 65 73 2c 20 | 74 68 75 73 20 77 65 20 |ssages, |thus we |
|00004730| 73 75 67 67 65 73 74 0a | 74 68 61 74 20 74 68 65 |suggest.|that the|
|00004740| 20 64 65 66 61 75 6c 74 | 20 44 49 53 43 41 52 44 | default| DISCARD|
|00004750| 20 70 6f 72 74 20 62 65 | 20 75 73 65 64 2e 0a 2e | port be| used...|
|00004760| 53 48 20 53 45 45 20 41 | 4c 53 4f 0a 63 6f 6c 6c |SH SEE A|LSO.coll|
|00004770| 65 63 74 28 31 29 0a 6f | 6e 20 28 64 65 66 61 75 |ect(1).o|n (defau|
|00004780| 6c 74 20 3d 20 31 34 34 | 30 0a 23 20 6d 69 6e 75 |lt = 144|0.# minu|
|00004790| 74 65 73 20 3d 20 32 34 | 20 68 72 73 29 2e 0a 23 |tes = 24| hrs)..#|
|000047a0| 0a 0a 55 53 41 47 45 3d | 22 55 73 61 67 65 3a 20 |..USAGE=|"Usage: |
|000047b0| 63 6f 6c 6c 65 63 74 20 | 5b 2d 64 20 64 75 72 61 |collect |[-d dura|
|000047c0| 74 69 6f 6e 5f 6d 69 6e | 5d 20 5b 2d 69 20 69 6e |tion_min|] [-i in|
|000047d0| 74 65 72 66 61 63 65 5d | 0a 09 5b 2d 70 20 68 6f |terface]|..[-p ho|
|000047e0| 73 74 31 20 68 6f 73 74 | 32 5d 20 6c 6f 63 61 6c |st1 host|2] local|
|000047f0| 6e 65 74 5f 6e 75 6d 62 | 65 72 22 0a 20 0a 23 0a |net_numb|er". .#.|
|00004800| 63 6f 6c 6c 65 63 74 2f | 67 65 6e 65 72 61 74 6f |collect/|generato|
|00004810| 72 2e 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |r.c.....|........|
|00004820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004860| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 34 36 |.... 6|00 . 246|
|00004870| 33 32 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |32 . | 0 . |
|00004880| 20 20 32 33 32 33 33 20 | 20 35 31 31 35 32 33 36 | 23233 | 5115236|
|00004890| 34 35 31 20 20 20 37 37 | 32 32 00 20 00 00 00 00 |451 77|22. ....|
|000048a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a00| 2f 2a 0a 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |/*. * Co|pyright |
|00004a10| 28 63 29 20 31 39 39 31 | 20 55 6e 69 76 65 72 73 |(c) 1991| Univers|
|00004a20| 69 74 79 20 6f 66 20 53 | 6f 75 74 68 65 72 6e 20 |ity of S|outhern |
|00004a30| 43 61 6c 69 66 6f 72 6e | 69 61 2e 0a 20 2a 20 41 |Californ|ia.. * A|
|00004a40| 6c 6c 20 72 69 67 68 74 | 73 20 72 65 73 65 72 76 |ll right|s reserv|
|00004a50| 65 64 2e 0a 20 2a 0a 20 | 2a 20 52 65 64 69 73 74 |ed.. *. |* Redist|
|00004a60| 72 69 62 75 74 69 6f 6e | 20 61 6e 64 20 75 73 65 |ribution| and use|
|00004a70| 20 69 6e 20 73 6f 75 72 | 63 65 20 61 6e 64 20 62 | in sour|ce and b|
|00004a80| 69 6e 61 72 79 20 66 6f | 72 6d 73 20 61 72 65 20 |inary fo|rms are |
|00004a90| 70 65 72 6d 69 74 74 65 | 64 0a 20 2a 20 70 72 6f |permitte|d. * pro|
|00004aa0| 76 69 64 65 64 20 74 68 | 61 74 20 74 68 65 20 61 |vided th|at the a|
|00004ab0| 62 6f 76 65 20 63 6f 70 | 79 72 69 67 68 74 20 6e |bove cop|yright n|
|00004ac0| 6f 74 69 63 65 20 61 6e | 64 20 74 68 69 73 20 70 |otice an|d this p|
|00004ad0| 61 72 61 67 72 61 70 68 | 20 61 72 65 0a 20 2a 20 |aragraph| are. * |
|00004ae0| 64 75 70 6c 69 63 61 74 | 65 64 20 69 6e 20 61 6c |duplicat|ed in al|
|00004af0| 6c 20 73 75 63 68 20 66 | 6f 72 6d 73 20 61 6e 64 |l such f|orms and|
|00004b00| 20 74 68 61 74 20 61 6e | 79 20 64 6f 63 75 6d 65 | that an|y docume|
|00004b10| 6e 74 61 74 69 6f 6e 2c | 0a 20 2a 20 61 64 76 65 |ntation,|. * adve|
|00004b20| 72 74 69 73 69 6e 67 20 | 6d 61 74 65 72 69 61 6c |rtising |material|
|00004b30| 73 2c 20 61 6e 64 20 6f | 74 68 65 72 20 6d 61 74 |s, and o|ther mat|
|00004b40| 65 72 69 61 6c 73 20 72 | 65 6c 61 74 65 64 20 74 |erials r|elated t|
|00004b50| 6f 20 73 75 63 68 0a 20 | 2a 20 64 69 73 74 72 69 |o such. |* distri|
|00004b60| 62 75 74 69 6f 6e 20 61 | 6e 64 20 75 73 65 20 61 |bution a|nd use a|
|00004b70| 63 6b 6e 6f 77 6c 65 64 | 67 65 20 74 68 61 74 20 |cknowled|ge that |
|00004b80| 74 68 65 20 73 6f 66 74 | 77 61 72 65 20 77 61 73 |the soft|ware was|
|00004b90| 20 64 65 76 65 6c 6f 70 | 65 64 0a 20 2a 20 62 79 | develop|ed. * by|
|00004ba0| 20 74 68 65 20 55 6e 69 | 76 65 72 73 69 74 79 20 | the Uni|versity |
|00004bb0| 6f 66 20 53 6f 75 74 68 | 65 72 6e 20 43 61 6c 69 |of South|ern Cali|
|00004bc0| 66 6f 72 6e 69 61 2e 20 | 54 68 65 20 6e 61 6d 65 |fornia. |The name|
|00004bd0| 20 6f 66 20 74 68 65 20 | 55 6e 69 76 65 72 73 69 | of the |Universi|
|00004be0| 74 79 20 0a 20 2a 20 6d | 61 79 20 6e 6f 74 20 62 |ty . * m|ay not b|
|00004bf0| 65 20 75 73 65 64 20 74 | 6f 20 65 6e 64 6f 72 73 |e used t|o endors|
|00004c00| 65 20 6f 72 20 70 72 6f | 6d 6f 74 65 20 70 72 6f |e or pro|mote pro|
|00004c10| 64 75 63 74 73 20 64 65 | 72 69 76 65 64 20 66 72 |ducts de|rived fr|
|00004c20| 6f 6d 20 74 68 69 73 20 | 0a 20 2a 20 73 6f 66 74 |om this |. * soft|
|00004c30| 77 61 72 65 20 77 69 74 | 68 6f 75 74 20 73 70 65 |ware wit|hout spe|
|00004c40| 63 69 66 69 63 20 70 72 | 69 6f 72 20 77 72 69 74 |cific pr|ior writ|
|00004c50| 74 65 6e 20 70 65 72 6d | 69 73 73 69 6f 6e 2e 0a |ten perm|ission..|
|00004c60| 20 2a 20 54 48 49 53 20 | 53 4f 46 54 57 41 52 45 | * THIS |SOFTWARE|
|00004c70| 20 49 53 20 50 52 4f 56 | 49 44 45 44 20 60 60 41 | IS PROV|IDED ``A|
|00004c80| 53 20 49 53 27 27 20 41 | 4e 44 20 57 49 54 48 4f |S IS'' A|ND WITHO|
|00004c90| 55 54 20 41 4e 59 20 45 | 58 50 52 45 53 53 20 4f |UT ANY E|XPRESS O|
|00004ca0| 52 0a 20 2a 20 49 4d 50 | 4c 49 45 44 20 57 41 52 |R. * IMP|LIED WAR|
|00004cb0| 52 41 4e 54 49 45 53 2c | 20 49 4e 43 4c 55 44 49 |RANTIES,| INCLUDI|
|00004cc0| 4e 47 2c 20 57 49 54 48 | 4f 55 54 20 4c 49 4d 49 |NG, WITH|OUT LIMI|
|00004cd0| 54 41 54 49 4f 4e 2c 20 | 54 48 45 20 49 4d 50 4c |TATION, |THE IMPL|
|00004ce0| 49 45 44 0a 20 2a 20 57 | 41 52 52 41 4e 54 49 45 |IED. * W|ARRANTIE|
|00004cf0| 53 20 4f 46 20 4d 45 52 | 43 48 41 4e 54 49 42 49 |S OF MER|CHANTIBI|
|00004d00| 4c 49 54 59 20 41 4e 44 | 20 46 49 54 4e 45 53 53 |LITY AND| FITNESS|
|00004d10| 20 46 4f 52 20 41 20 50 | 41 52 54 49 43 55 4c 41 | FOR A P|ARTICULA|
|00004d20| 52 20 50 55 52 50 4f 53 | 45 2e 0a 20 2a 0a 2a 2f |R PURPOS|E.. *.*/|
|00004d30| 0a 0a 2f 2a 0a 20 2a 20 | 24 4c 6f 67 3a 20 67 65 |../*. * |$Log: ge|
|00004d40| 6e 65 72 61 74 6f 72 2e | 63 2c 76 20 24 0a 20 2a |nerator.|c,v $. *|
|00004d50| 20 52 65 76 69 73 69 6f | 6e 20 31 2e 34 20 20 31 | Revisio|n 1.4 1|
|00004d60| 39 39 31 2f 31 31 2f 32 | 38 20 20 31 39 3a 30 31 |991/11/2|8 19:01|
|00004d70| 3a 32 30 20 20 6a 61 6d | 69 6e 0a 20 2a 20 72 65 |:20 jam|in. * re|
|00004d80| 70 6c 61 63 65 20 6e 6f | 6e 2d 70 6f 72 74 61 62 |place no|n-portab|
|00004d90| 6c 65 20 75 73 6c 65 65 | 70 20 77 69 74 68 20 73 |le uslee|p with s|
|00004da0| 65 6c 65 63 74 2e 0a 20 | 2a 20 54 68 61 6e 6b 73 |elect.. |* Thanks|
|00004db0| 20 74 6f 20 4a 65 66 66 | 20 4d 6f 67 75 6c 2e 0a | to Jeff| Mogul..|
|00004dc0| 20 2a 0a 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 31 | *. * Re|vision 1|
|00004dd0| 2e 33 20 20 31 39 39 31 | 2f 31 31 2f 32 32 20 20 |.3 1991|/11/22 |
|00004de0| 32 31 3a 34 33 3a 31 36 | 20 20 6a 61 6d 69 6e 0a |21:43:16| jamin.|
|00004df0| 20 2a 20 6c 6f 67 66 69 | 6c 65 20 6e 61 6d 65 64 | * logfi|le named|
|00004e00| 20 3c 68 6f 73 74 6e 61 | 6d 65 3e 2e 0a 20 2a 0a | <hostna|me>.. *.|
|00004e10| 20 2a 20 52 65 76 69 73 | 69 6f 6e 20 31 2e 32 20 | * Revis|ion 1.2 |
|00004e20| 20 31 39 39 31 2f 31 31 | 2f 32 32 20 20 30 37 3a | 1991/11|/22 07:|
|00004e30| 32 36 3a 33 37 20 20 6a | 61 6d 69 6e 0a 20 2a 20 |26:37 j|amin. * |
|00004e40| 61 64 64 65 64 20 61 20 | 2d 64 20 6f 70 74 69 6f |added a |-d optio|
|00004e50| 6e 20 74 6f 20 73 70 65 | 63 69 66 79 20 64 75 72 |n to spe|cify dur|
|00004e60| 61 74 69 6f 6e 2e 0a 20 | 2a 0a 20 2a 20 67 65 6e |ation.. |*. * gen|
|00004e70| 65 72 61 74 6f 72 0a 20 | 2a 0a 20 2a 20 20 20 20 |erator. |*. * |
|00004e80| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 67 65 6e |this rou|tine gen|
|00004e90| 65 72 61 74 65 73 20 61 | 20 72 61 6e 64 6f 6d 20 |erates a| random |
|00004ea0| 73 74 72 65 61 6d 20 6f | 66 20 55 44 50 20 70 61 |stream o|f UDP pa|
|00004eb0| 63 6b 65 74 73 20 74 6f | 20 74 68 65 20 0a 20 2a |ckets to| the . *|
|00004ec0| 20 73 70 65 63 69 66 69 | 65 64 20 68 6f 73 74 2c | specifi|ed host,|
|00004ed0| 20 73 65 6e 64 69 6e 67 | 20 70 61 63 6b 65 74 73 | sending| packets|
|00004ee0| 20 75 73 69 6e 67 20 61 | 6e 20 65 78 70 6f 6e 65 | using a|n expone|
|00004ef0| 6e 74 69 61 6c 20 64 69 | 73 74 72 69 62 75 74 69 |ntial di|stributi|
|00004f00| 6f 6e 0a 20 2a 20 77 69 | 74 68 20 61 20 73 70 65 |on. * wi|th a spe|
|00004f10| 63 69 66 69 65 64 20 6d | 65 61 6e 2e 0a 20 2a 20 |cified m|ean.. * |
|00004f20| 20 20 20 69 6e 70 75 74 | 73 3a 20 72 65 6d 6f 74 | input|s: remot|
|00004f30| 65 5f 68 6f 73 74 2c 20 | 6d 65 61 6e 5f 69 6e 74 |e_host, |mean_int|
|00004f40| 65 72 61 72 72 69 76 61 | 6c 0a 20 2a 0a 2a 2f 0a |erarriva|l. *.*/.|
|00004f50| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |.#includ|e <stdio|
|00004f60| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 69 |.h>.#inc|lude <si|
|00004f70| 67 6e 61 6c 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |gnal.h>.|#include|
|00004f80| 20 3c 73 74 72 69 6e 67 | 73 2e 68 3e 0a 23 69 6e | <string|s.h>.#in|
|00004f90| 63 6c 75 64 65 20 3c 6d | 61 74 68 2e 68 3e 0a 23 |clude <m|ath.h>.#|
|00004fa0| 69 6e 63 6c 75 64 65 20 | 3c 63 74 79 70 65 2e 68 |include |<ctype.h|
|00004fb0| 3e 0a 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |>..#incl|ude <sys|
|00004fc0| 2f 74 79 70 65 73 2e 68 | 3e 0a 23 69 6e 63 6c 75 |/types.h|>.#inclu|
|00004fd0| 64 65 20 3c 73 79 73 2f | 74 69 6d 65 2e 68 3e 0a |de <sys/|time.h>.|
|00004fe0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 73 6f |#include| <sys/so|
|00004ff0| 63 6b 65 74 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |cket.h>.|#include|
|00005000| 20 3c 6e 65 74 69 6e 65 | 74 2f 69 6e 2e 68 3e 0a | <netine|t/in.h>.|
|00005010| 23 69 6e 63 6c 75 64 65 | 20 3c 61 72 70 61 2f 69 |#include| <arpa/i|
|00005020| 6e 65 74 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |net.h>.#|include |
|00005030| 3c 6e 65 74 64 62 2e 68 | 3e 0a 0a 0a 64 6f 75 62 |<netdb.h|>...doub|
|00005040| 6c 65 20 64 72 61 6e 64 | 34 38 28 29 3b 0a 0a 2f |le drand|48();../|
|00005050| 2a 0a 2a 2a 20 6c 6f 63 | 61 6c 6c 79 20 64 65 66 |*.** loc|ally def|
|00005060| 69 6e 65 64 20 72 6f 75 | 74 69 6e 65 73 0a 2a 2f |ined rou|tines.*/|
|00005070| 0a 76 6f 69 64 20 20 75 | 73 61 67 65 28 29 3b 0a |.void u|sage();.|
|00005080| 76 6f 69 64 20 20 70 61 | 72 73 65 5f 63 6f 6d 6d |void pa|rse_comm|
|00005090| 61 6e 64 5f 6c 69 6e 65 | 28 29 3b 0a 76 6f 69 64 |and_line|();.void|
|000050a0| 20 20 73 69 67 6e 61 6c | 5f 68 61 6e 64 6c 65 72 | signal|_handler|
|000050b0| 28 29 3b 0a 75 5f 6c 6f | 6e 67 20 20 73 6c 65 65 |();.u_lo|ng slee|
|000050c0| 70 5f 74 69 6d 65 28 29 | 3b 0a 0a 2f 2a 0a 2a 2a |p_time()|;../*.**|
|000050d0| 20 67 6c 6f 62 61 6c 20 | 76 61 72 73 0a 2a 2f 0a | global |vars.*/.|
|000050e0| 46 49 4c 45 20 2a 20 20 | 6c 6f 67 5f 66 69 6c 65 |FILE * |log_file|
|000050f0| 5f 66 70 3b 20 20 20 20 | 2f 2a 20 6c 6f 67 20 66 |_fp; |/* log f|
|00005100| 69 6c 65 20 66 69 6c 65 | 70 6f 69 6e 74 65 72 20 |ile file|pointer |
|00005110| 2a 2f 0a 75 5f 6c 6f 6e | 67 20 20 73 65 6e 64 5f |*/.u_lon|g send_|
|00005120| 74 6f 74 61 6c 3b 20 20 | 20 20 2f 2a 20 74 6f 74 |total; | /* tot|
|00005130| 61 6c 20 6e 75 6d 62 65 | 72 20 70 6b 74 73 20 73 |al numbe|r pkts s|
|00005140| 65 6e 74 20 2a 2f 0a 0a | 0a 6d 61 69 6e 28 61 72 |ent */..|.main(ar|
|00005150| 67 63 2c 20 61 72 67 76 | 29 0a 20 20 20 20 69 6e |gc, argv|). in|
|00005160| 74 20 20 20 20 61 72 67 | 63 3b 0a 20 20 20 20 63 |t arg|c;. c|
|00005170| 68 61 72 20 2a 2a 20 20 | 61 72 67 76 3b 0a 7b 0a |har ** |argv;.{.|
|00005180| 0a 20 20 20 20 2f 2a 0a | 20 20 20 20 2a 2a 20 69 |. /*.| ** i|
|00005190| 6e 70 75 74 20 70 61 72 | 61 6d 73 0a 20 20 20 20 |nput par|ams. |
|000051a0| 2a 2f 0a 20 20 20 20 63 | 68 61 72 20 20 72 65 6d |*/. c|har rem|
|000051b0| 6f 74 65 5f 68 6f 73 74 | 5b 31 32 38 5d 3b 20 20 |ote_host|[128]; |
|000051c0| 20 2f 2a 20 68 6f 73 74 | 20 74 6f 20 73 65 6e 64 | /* host| to send|
|000051d0| 20 74 6f 20 2a 2f 0a 20 | 20 20 20 75 5f 73 68 6f | to */. | u_sho|
|000051e0| 72 74 20 20 72 65 6d 6f | 74 65 5f 70 6f 72 74 3b |rt remo|te_port;|
|000051f0| 20 20 20 20 2f 2a 20 70 | 6f 72 74 20 74 6f 20 73 | /* p|ort to s|
|00005200| 65 6e 64 20 74 6f 20 2a | 2f 0a 20 20 20 20 75 5f |end to *|/. u_|
|00005210| 6c 6f 6e 67 20 20 6d 65 | 61 6e 5f 69 6e 74 65 72 |long me|an_inter|
|00005220| 61 72 72 69 76 61 6c 3b | 20 20 20 20 2f 2a 20 6d |arrival;| /* m|
|00005230| 65 61 6e 20 73 65 6e 64 | 20 69 6e 74 65 72 61 72 |ean send| interar|
|00005240| 72 69 76 61 6c 20 69 6e | 20 6d 69 63 72 6f 73 65 |rival in| microse|
|00005250| 63 6f 6e 64 73 20 2a 2f | 0a 20 20 20 20 6c 6f 6e |conds */|. lon|
|00005260| 67 20 20 64 75 72 61 74 | 69 6f 6e 3b 20 20 20 20 |g durat|ion; |
|00005270| 20 20 20 20 2f 2a 20 72 | 75 6e 20 64 75 72 61 74 | /* r|un durat|
|00005280| 69 6f 6e 20 69 6e 20 73 | 65 63 6f 6e 64 73 2e 20 |ion in s|econds. |
|00005290| 2a 2f 0a 20 20 20 20 69 | 6e 74 20 20 20 20 76 65 |*/. i|nt ve|
|000052a0| 72 62 6f 73 65 3b 0a 0a | 20 20 20 20 2f 2a 0a 20 |rbose;..| /*. |
|000052b0| 20 20 20 2a 2a 20 6c 6f | 63 61 6c 20 76 61 72 73 | ** lo|cal vars|
|000052c0| 0a 20 20 20 20 2a 2f 0a | 20 20 20 20 46 49 4c 45 |. */.| FILE|
|000052d0| 20 2a 20 20 20 20 20 20 | 64 61 74 65 5f 66 70 3b | * |date_fp;|
|000052e0| 20 20 20 20 20 20 20 20 | 2f 2a 20 66 69 6c 65 20 | |/* file |
|000052f0| 70 6f 69 6e 74 65 72 20 | 74 6f 20 72 65 61 64 20 |pointer |to read |
|00005300| 64 61 74 65 20 6f 75 74 | 70 75 74 20 66 72 6f 6d |date out|put from|
|00005310| 20 2a 2f 0a 20 20 20 20 | 63 68 61 72 20 20 20 20 | */. |char |
|00005320| 20 20 20 20 64 61 74 65 | 5b 32 35 36 5d 3b 20 20 | date|[256]; |
|00005330| 20 20 20 20 2f 2a 20 63 | 75 72 72 65 6e 74 20 64 | /* c|urrent d|
|00005340| 61 74 65 20 73 74 72 69 | 6e 67 20 2a 2f 0a 20 20 |ate stri|ng */. |
|00005350| 20 20 73 74 72 75 63 74 | 20 74 69 6d 65 76 61 6c | struct| timeval|
|00005360| 20 73 6c 65 65 70 5f 69 | 6e 74 65 72 76 61 6c 3b | sleep_i|nterval;|
|00005370| 20 20 2f 2a 20 74 69 6d | 65 20 74 6f 20 73 6c 65 | /* tim|e to sle|
|00005380| 65 70 20 62 65 66 6f 72 | 65 20 6e 65 78 74 20 73 |ep befor|e next s|
|00005390| 65 6e 64 20 2a 2f 0a 20 | 20 20 20 73 74 72 75 63 |end */. | struc|
|000053a0| 74 20 74 69 6d 65 76 61 | 6c 20 73 74 61 72 74 74 |t timeva|l startt|
|000053b0| 69 6d 65 2c 20 6e 6f 77 | 3b 20 20 20 2f 2a 20 68 |ime, now|; /* h|
|000053c0| 6f 77 20 6c 6f 6e 67 20 | 68 61 76 65 20 77 65 20 |ow long |have we |
|000053d0| 62 65 65 6e 20 72 75 6e | 6e 69 6e 67 3f 20 2a 2f |been run|ning? */|
|000053e0| 0a 20 20 20 20 69 6e 74 | 20 20 20 20 73 3b 20 20 |. int| s; |
|000053f0| 20 20 2f 2a 20 73 65 6e | 64 20 73 6f 63 6b 65 74 | /* sen|d socket|
|00005400| 20 2a 2f 0a 20 20 20 20 | 73 74 72 75 63 74 20 73 | */. |struct s|
|00005410| 6f 63 6b 61 64 64 72 5f | 69 6e 20 73 69 6e 3b 20 |ockaddr_|in sin; |
|00005420| 20 2f 2a 20 72 65 6d 6f | 74 65 20 68 6f 73 74 20 | /* remo|te host |
|00005430| 69 6e 74 65 72 6e 65 74 | 20 61 64 64 72 65 73 73 |internet| address|
|00005440| 20 2a 2f 0a 20 20 20 20 | 73 74 72 75 63 74 20 68 | */. |struct h|
|00005450| 6f 73 74 65 6e 74 20 2a | 68 70 3b 20 20 20 20 2f |ostent *|hp; /|
|00005460| 2a 20 68 6f 73 74 20 69 | 6e 66 6f 20 66 6f 72 20 |* host i|nfo for |
|00005470| 72 65 6d 6f 74 65 20 68 | 6f 73 74 20 2a 2f 0a 20 |remote h|ost */. |
|00005480| 20 20 20 63 68 61 72 20 | 2a 20 20 61 64 64 72 5f | char |* addr_|
|00005490| 70 74 72 3b 20 20 2f 2a | 20 70 6f 69 6e 74 65 72 |ptr; /*| pointer|
|000054a0| 20 69 6e 74 6f 20 68 6f | 73 74 20 6e 61 6d 65 2f | into ho|st name/|
|000054b0| 61 64 64 72 65 73 73 20 | 73 74 72 69 6e 67 20 2a |address |string *|
|000054c0| 2f 0a 20 20 20 20 75 5f | 6c 6f 6e 67 20 20 68 6f |/. u_|long ho|
|000054d0| 73 74 5f 6e 75 6d 3b 20 | 20 2f 2a 20 68 6f 6c 64 |st_num; | /* hold|
|000054e0| 20 68 6f 73 74 20 61 64 | 64 72 65 73 73 20 69 66 | host ad|dress if|
|000054f0| 20 65 6e 74 65 72 65 64 | 20 61 73 20 6e 75 6d 62 | entered| as numb|
|00005500| 65 72 20 2a 2f 0a 20 20 | 20 20 63 68 61 72 20 20 |er */. | char |
|00005510| 6c 6f 63 61 6c 5f 68 6f | 73 74 5b 31 32 38 5d 3b |local_ho|st[128];|
|00005520| 0a 0a 0a 20 20 20 20 28 | 76 6f 69 64 29 73 74 72 |... (|void)str|
|00005530| 63 70 79 28 72 65 6d 6f | 74 65 5f 68 6f 73 74 2c |cpy(remo|te_host,|
|00005540| 20 22 6c 6f 63 61 6c 68 | 6f 73 74 22 29 3b 0a 20 | "localh|ost");. |
|00005550| 20 20 20 72 65 6d 6f 74 | 65 5f 70 6f 72 74 20 3d | remot|e_port =|
|00005560| 20 28 75 5f 73 68 6f 72 | 74 29 39 3b 0a 20 20 20 | (u_shor|t)9;. |
|00005570| 20 6d 65 61 6e 5f 69 6e | 74 65 72 61 72 72 69 76 | mean_in|terarriv|
|00005580| 61 6c 20 3d 20 31 30 30 | 30 30 30 30 4c 3b 0a 20 |al = 100|0000L;. |
|00005590| 20 20 20 64 75 72 61 74 | 69 6f 6e 20 3d 20 38 36 | durat|ion = 86|
|000055a0| 37 30 30 4c 3b 0a 20 20 | 20 20 76 65 72 62 6f 73 |700L;. | verbos|
|000055b0| 65 20 3d 20 30 3b 0a 0a | 20 20 20 20 2f 2a 0a 20 |e = 0;..| /*. |
|000055c0| 20 20 20 2a 2a 20 70 61 | 72 73 65 20 74 68 65 20 | ** pa|rse the |
|000055d0| 63 6f 6d 6d 61 6e 64 20 | 6c 69 6e 65 20 66 6f 72 |command |line for|
|000055e0| 20 61 6e 79 20 64 65 66 | 61 75 6c 74 20 6f 76 65 | any def|ault ove|
|000055f0| 72 72 69 64 65 73 0a 20 | 20 20 20 2a 2f 0a 20 20 |rrides. | */. |
|00005600| 20 20 28 76 6f 69 64 29 | 70 61 72 73 65 5f 63 6f | (void)|parse_co|
|00005610| 6d 6d 61 6e 64 5f 6c 69 | 6e 65 28 61 72 67 63 2c |mmand_li|ne(argc,|
|00005620| 20 61 72 67 76 2c 20 72 | 65 6d 6f 74 65 5f 68 6f | argv, r|emote_ho|
|00005630| 73 74 2c 0a 20 20 20 20 | 20 20 26 72 65 6d 6f 74 |st,. | &remot|
|00005640| 65 5f 70 6f 72 74 2c 20 | 26 6d 65 61 6e 5f 69 6e |e_port, |&mean_in|
|00005650| 74 65 72 61 72 72 69 76 | 61 6c 2c 20 26 64 75 72 |terarriv|al, &dur|
|00005660| 61 74 69 6f 6e 2c 20 26 | 76 65 72 62 6f 73 65 29 |ation, &|verbose)|
|00005670| 3b 0a 20 20 20 20 0a 20 | 20 20 20 2f 2a 0a 20 20 |;. . | /*. |
|00005680| 20 20 2a 2a 20 69 6e 73 | 74 61 6c 6c 20 74 68 65 | ** ins|tall the|
|00005690| 20 73 69 67 6e 61 6c 20 | 68 61 6e 64 6c 65 72 0a | signal |handler.|
|000056a0| 20 20 20 20 2a 2f 0a 20 | 20 20 20 28 76 6f 69 64 | */. | (void|
|000056b0| 29 73 69 67 6e 61 6c 28 | 53 49 47 48 55 50 2c 20 |)signal(|SIGHUP, |
|000056c0| 73 69 67 6e 61 6c 5f 68 | 61 6e 64 6c 65 72 29 3b |signal_h|andler);|
|000056d0| 0a 20 20 20 20 28 76 6f | 69 64 29 73 69 67 6e 61 |. (vo|id)signa|
|000056e0| 6c 28 53 49 47 49 4e 54 | 2c 20 73 69 67 6e 61 6c |l(SIGINT|, signal|
|000056f0| 5f 68 61 6e 64 6c 65 72 | 29 3b 0a 20 20 20 20 28 |_handler|);. (|
|00005700| 76 6f 69 64 29 73 69 67 | 6e 61 6c 28 53 49 47 51 |void)sig|nal(SIGQ|
|00005710| 55 49 54 2c 20 73 69 67 | 6e 61 6c 5f 68 61 6e 64 |UIT, sig|nal_hand|
|00005720| 6c 65 72 29 3b 0a 20 20 | 20 20 28 76 6f 69 64 29 |ler);. | (void)|
|00005730| 73 69 67 6e 61 6c 28 53 | 49 47 54 45 52 4d 2c 20 |signal(S|IGTERM, |
|00005740| 73 69 67 6e 61 6c 5f 68 | 61 6e 64 6c 65 72 29 3b |signal_h|andler);|
|00005750| 0a 0a 20 20 20 20 2f 2a | 0a 20 20 20 20 2a 2a 20 |.. /*|. ** |
|00005760| 73 65 74 20 75 70 20 73 | 6f 63 6b 65 74 20 74 6f |set up s|ocket to|
|00005770| 20 73 65 6e 64 20 6f 6e | 0a 20 20 20 20 2a 2f 0a | send on|. */.|
|00005780| 20 20 20 20 69 66 20 28 | 28 73 20 3d 20 73 6f 63 | if (|(s = soc|
|00005790| 6b 65 74 28 41 46 5f 49 | 4e 45 54 2c 20 53 4f 43 |ket(AF_I|NET, SOC|
|000057a0| 4b 5f 44 47 52 41 4d 2c | 20 30 29 29 20 3c 20 30 |K_DGRAM,| 0)) < 0|
|000057b0| 29 20 7b 0a 20 20 70 65 | 72 72 6f 72 28 22 67 65 |) {. pe|rror("ge|
|000057c0| 6e 65 72 61 74 6f 72 3a | 20 73 6f 63 6b 65 74 22 |nerator:| socket"|
|000057d0| 29 3b 0a 20 20 65 78 69 | 74 28 31 29 3b 0a 20 20 |);. exi|t(1);. |
|000057e0| 20 20 7d 0a 0a 20 20 20 | 20 2f 2a 0a 20 20 20 20 | }.. | /*. |
|000057f0| 2a 2a 20 67 65 74 20 74 | 68 65 20 6c 6f 63 61 6c |** get t|he local|
|00005800| 20 68 6f 73 74 73 20 6e | 61 6d 65 0a 20 20 20 20 | hosts n|ame. |
|00005810| 2a 2f 0a 20 20 20 20 69 | 66 20 28 67 65 74 68 6f |*/. i|f (getho|
|00005820| 73 74 6e 61 6d 65 28 6c | 6f 63 61 6c 5f 68 6f 73 |stname(l|ocal_hos|
|00005830| 74 2c 20 73 69 7a 65 6f | 66 28 6c 6f 63 61 6c 5f |t, sizeo|f(local_|
|00005840| 68 6f 73 74 29 29 20 3d | 3d 20 2d 31 29 20 7b 0a |host)) =|= -1) {.|
|00005850| 20 20 20 20 20 20 20 20 | 70 65 72 72 6f 72 28 22 | |perror("|
|00005860| 67 65 6e 65 72 61 74 6f | 72 3a 20 67 65 74 68 6f |generato|r: getho|
|00005870| 73 74 6e 61 6d 65 20 66 | 61 69 6c 65 64 22 29 3b |stname f|ailed");|
|00005880| 0a 20 20 20 20 20 20 20 | 20 65 78 69 74 28 31 29 |. | exit(1)|
|00005890| 3b 0a 20 20 20 20 7d 0a | 0a 20 20 20 20 2f 2a 0a |;. }.|. /*.|
|000058a0| 20 20 20 20 2a 2a 20 6f | 70 65 6e 20 74 68 65 20 | ** o|pen the |
|000058b0| 6c 6f 67 20 66 69 6c 65 | 0a 20 20 20 20 2a 2f 0a |log file|. */.|
|000058c0| 20 20 20 20 6c 6f 67 5f | 66 69 6c 65 5f 66 70 20 | log_|file_fp |
|000058d0| 3d 20 66 6f 70 65 6e 28 | 6c 6f 63 61 6c 5f 68 6f |= fopen(|local_ho|
|000058e0| 73 74 2c 20 22 77 22 29 | 3b 0a 20 20 20 20 69 66 |st, "w")|;. if|
|000058f0| 20 28 21 6c 6f 67 5f 66 | 69 6c 65 5f 66 70 29 20 | (!log_f|ile_fp) |
|00005900| 7b 0a 20 20 20 20 20 20 | 20 20 28 76 6f 69 64 29 |{. | (void)|
|00005910| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 20 |fprintf(|stderr, |
|00005920| 22 63 6f 75 6c 64 20 6e | 6f 74 20 6f 70 65 6e 20 |"could n|ot open |
|00005930| 6c 6f 67 20 66 69 6c 65 | 20 25 73 5c 6e 22 2c 20 |log file| %s\n", |
|00005940| 6c 6f 63 61 6c 5f 68 6f | 73 74 29 3b 0a 20 20 20 |local_ho|st);. |
|00005950| 20 20 20 20 20 65 78 69 | 74 28 31 29 3b 0a 20 20 | exi|t(1);. |
|00005960| 20 20 7d 0a 0a 20 20 20 | 20 2f 2a 0a 20 20 20 20 | }.. | /*. |
|00005970| 2a 2a 20 67 65 74 20 74 | 68 65 20 68 6f 73 74 20 |** get t|he host |
|00005980| 65 6e 74 72 79 20 73 74 | 72 75 63 74 75 72 65 20 |entry st|ructure |
|00005990| 75 73 69 6e 67 20 74 68 | 65 20 6c 6f 6f 6b 65 64 |using th|e looked|
|000059a0| 20 75 70 20 6e 61 6d 65 | 0a 20 20 20 20 2a 2f 0a | up name|. */.|
|000059b0| 20 20 20 20 69 66 20 28 | 28 68 70 20 3d 20 67 65 | if (|(hp = ge|
|000059c0| 74 68 6f 73 74 62 79 6e | 61 6d 65 28 6c 6f 63 61 |thostbyn|ame(loca|
|000059d0| 6c 5f 68 6f 73 74 29 29 | 20 3d 3d 20 28 73 74 72 |l_host))| == (str|
|000059e0| 75 63 74 20 68 6f 73 74 | 65 6e 74 20 2a 29 4e 55 |uct host|ent *)NU|
|000059f0| 4c 4c 29 20 7b 0a 20 20 | 20 20 20 20 20 20 70 65 |LL) {. | pe|
|00005a00| 72 72 6f 72 28 22 67 65 | 6e 65 72 61 74 6f 72 3a |rror("ge|nerator:|
|00005a10| 20 67 65 74 68 6f 73 74 | 62 79 6e 61 6d 65 20 66 | gethost|byname f|
|00005a20| 61 69 6c 65 64 22 29 3b | 0a 20 20 20 20 20 20 20 |ailed");|. |
|00005a30| 20 65 78 69 74 28 31 29 | 3b 0a 20 20 20 20 7d 0a | exit(1)|;. }.|
|00005a40| 0a 20 20 20 20 2f 2a 0a | 20 20 20 20 2a 2a 20 62 |. /*.| ** b|
|00005a50| 69 6e 64 20 6c 6f 63 61 | 6c 20 61 64 64 72 65 73 |ind loca|l addres|
|00005a60| 73 0a 20 20 20 20 2a 2f | 0a 20 20 20 20 62 7a 65 |s. */|. bze|
|00005a70| 72 6f 28 28 63 68 61 72 | 20 2a 29 26 73 69 6e 2c |ro((char| *)&sin,|
|00005a80| 20 73 69 7a 65 6f 66 28 | 73 69 6e 29 29 3b 0a 20 | sizeof(|sin));. |
|00005a90| 20 20 20 73 69 6e 2e 73 | 69 6e 5f 66 61 6d 69 6c | sin.s|in_famil|
|00005aa0| 79 20 3d 20 68 70 2d 3e | 68 5f 61 64 64 72 74 79 |y = hp->|h_addrty|
|00005ab0| 70 65 3b 0a 20 20 20 20 | 73 69 6e 2e 73 69 6e 5f |pe;. |sin.sin_|
|00005ac0| 70 6f 72 74 20 3d 20 68 | 74 6f 6e 73 28 72 65 6d |port = h|tons(rem|
|00005ad0| 6f 74 65 5f 70 6f 72 74 | 29 3b 0a 20 20 20 20 62 |ote_port|);. b|
|00005ae0| 63 6f 70 79 28 68 70 2d | 3e 68 5f 61 64 64 72 2c |copy(hp-|>h_addr,|
|00005af0| 20 28 63 68 61 72 20 2a | 29 26 73 69 6e 2e 73 69 | (char *|)&sin.si|
|00005b00| 6e 5f 61 64 64 72 2c 20 | 68 70 2d 3e 68 5f 6c 65 |n_addr, |hp->h_le|
|00005b10| 6e 67 74 68 29 3b 0a 2f | 2a 20 20 20 20 69 66 20 |ngth);./|* if |
|00005b20| 28 62 69 6e 64 28 73 2c | 20 28 73 74 72 75 63 74 |(bind(s,| (struct|
|00005b30| 20 73 6f 63 6b 61 64 64 | 72 20 2a 29 26 73 69 6e | sockadd|r *)&sin|
|00005b40| 2c 20 73 69 7a 65 6f 66 | 28 73 69 6e 29 29 20 3c |, sizeof|(sin)) <|
|00005b50| 20 30 29 20 7b 0a 20 20 | 70 65 72 72 6f 72 28 22 | 0) {. |perror("|
|00005b60| 67 65 6e 65 72 61 74 6f | 72 3a 20 62 69 6e 64 20 |generato|r: bind |
|00005b70| 66 61 69 6c 65 64 22 29 | 3b 0a 20 20 65 78 69 74 |failed")|;. exit|
|00005b80| 28 31 29 3b 0a 20 20 20 | 20 7d 20 2a 2f 0a 20 20 |(1);. | } */. |
|00005b90| 20 20 62 7a 65 72 6f 28 | 28 63 68 61 72 20 2a 29 | bzero(|(char *)|
|00005ba0| 26 73 69 6e 2c 20 73 69 | 7a 65 6f 66 28 73 69 6e |&sin, si|zeof(sin|
|00005bb0| 29 29 3b 0a 0a 20 20 20 | 20 2f 2a 0a 20 20 20 20 |));.. | /*. |
|00005bc0| 2a 2a 20 67 65 74 20 74 | 68 65 20 72 65 6d 6f 74 |** get t|he remot|
|00005bd0| 65 20 68 6f 73 74 20 61 | 64 64 72 65 73 73 0a 20 |e host a|ddress. |
|00005be0| 20 20 20 2a 2f 0a 20 20 | 20 20 69 66 20 28 28 69 | */. | if ((i|
|00005bf0| 6e 74 29 28 68 6f 73 74 | 5f 6e 75 6d 20 3d 20 69 |nt)(host|_num = i|
|00005c00| 6e 65 74 5f 61 64 64 72 | 28 72 65 6d 6f 74 65 5f |net_addr|(remote_|
|00005c10| 68 6f 73 74 29 29 20 3d | 3d 20 2d 31 29 20 7b 0a |host)) =|= -1) {.|
|00005c20| 20 20 20 20 20 20 20 20 | 69 66 20 28 28 68 70 20 | |if ((hp |
|00005c30| 3d 20 67 65 74 68 6f 73 | 74 62 79 6e 61 6d 65 28 |= gethos|tbyname(|
|00005c40| 72 65 6d 6f 74 65 5f 68 | 6f 73 74 29 29 20 3d 3d |remote_h|ost)) ==|
|00005c50| 20 28 73 74 72 75 63 74 | 20 68 6f 73 74 65 6e 74 | (struct| hostent|
|00005c60| 20 2a 29 4e 55 4c 4c 29 | 20 7b 0a 20 20 20 20 20 | *)NULL)| {. |
|00005c70| 20 20 20 20 20 20 20 66 | 70 72 69 6e 74 66 28 73 | f|printf(s|
|00005c80| 74 64 65 72 72 2c 20 22 | 67 65 6e 65 72 61 74 6f |tderr, "|generato|
|00005c90| 72 3a 20 25 73 20 75 6e | 6b 6e 6f 77 6e 20 68 6f |r: %s un|known ho|
|00005ca0| 73 74 5c 6e 22 2c 20 72 | 65 6d 6f 74 65 5f 68 6f |st\n", r|emote_ho|
|00005cb0| 73 74 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |st);. | |
|00005cc0| 20 65 78 69 74 28 31 29 | 3b 0a 20 20 20 20 20 20 | exit(1)|;. |
|00005cd0| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 62 63 6f 70 | }. | bcop|
|00005ce0| 79 28 68 70 2d 3e 68 5f | 61 64 64 72 2c 20 28 63 |y(hp->h_|addr, (c|
|00005cf0| 68 61 72 20 2a 29 26 73 | 69 6e 2e 73 69 6e 5f 61 |har *)&s|in.sin_a|
|00005d00| 64 64 72 2c 20 68 70 2d | 3e 68 5f 6c 65 6e 67 74 |ddr, hp-|>h_lengt|
|00005d10| 68 29 3b 0a 20 20 20 20 | 20 20 20 20 73 69 6e 2e |h);. | sin.|
|00005d20| 73 69 6e 5f 66 61 6d 69 | 6c 79 20 3d 20 68 70 2d |sin_fami|ly = hp-|
|00005d30| 3e 68 5f 61 64 64 72 74 | 79 70 65 3b 0a 20 20 20 |>h_addrt|ype;. |
|00005d40| 20 7d 0a 20 20 20 20 65 | 6c 73 65 20 7b 0a 20 20 | }. e|lse {. |
|00005d50| 62 63 6f 70 79 28 28 63 | 68 61 72 20 2a 29 26 68 |bcopy((c|har *)&h|
|00005d60| 6f 73 74 5f 6e 75 6d 2c | 20 28 63 68 61 72 20 2a |ost_num,| (char *|
|00005d70| 29 26 73 69 6e 2e 73 69 | 6e 5f 61 64 64 72 2c 20 |)&sin.si|n_addr, |
|00005d80| 73 69 7a 65 6f 66 28 68 | 6f 73 74 5f 6e 75 6d 29 |sizeof(h|ost_num)|
|00005d90| 29 3b 0a 20 20 73 69 6e | 2e 73 69 6e 5f 66 61 6d |);. sin|.sin_fam|
|00005da0| 69 6c 79 20 3d 20 41 46 | 5f 49 4e 45 54 3b 0a 20 |ily = AF|_INET;. |
|00005db0| 20 20 20 7d 0a 20 20 20 | 20 73 69 6e 2e 73 69 6e | }. | sin.sin|
|00005dc0| 5f 70 6f 72 74 20 3d 20 | 68 74 6f 6e 73 28 72 65 |_port = |htons(re|
|00005dd0| 6d 6f 74 65 5f 70 6f 72 | 74 29 3b 0a 0a 20 20 20 |mote_por|t);.. |
|00005de0| 20 2f 2a 0a 20 20 20 20 | 2a 2a 20 70 72 69 6e 74 | /*. |** print|
|00005df0| 20 74 68 65 20 73 74 61 | 72 74 20 74 69 6d 65 0a | the sta|rt time.|
|00005e00| 20 20 20 20 2a 2f 0a 20 | 20 20 20 69 66 20 28 28 | */. | if ((|
|00005e10| 64 61 74 65 5f 66 70 20 | 3d 20 70 6f 70 65 6e 28 |date_fp |= popen(|
|00005e20| 22 64 61 74 65 22 2c 20 | 22 72 22 29 29 20 3d 3d |"date", |"r")) ==|
|00005e30| 20 4e 55 4c 4c 29 20 7b | 0a 20 20 20 20 20 20 20 | NULL) {|. |
|00005e40| 20 70 65 72 72 6f 72 28 | 22 70 6f 70 65 6e 28 64 | perror(|"popen(d|
|00005e50| 61 74 65 29 22 29 3b 0a | 20 20 20 20 7d 20 65 6c |ate)");.| } el|
|00005e60| 73 65 20 7b 0a 20 20 20 | 20 20 20 20 20 28 76 6f |se {. | (vo|
|00005e70| 69 64 29 66 67 65 74 73 | 28 64 61 74 65 2c 20 73 |id)fgets|(date, s|
|00005e80| 69 7a 65 6f 66 28 64 61 | 74 65 29 2c 20 64 61 74 |izeof(da|te), dat|
|00005e90| 65 5f 66 70 29 3b 0a 20 | 20 20 20 20 20 20 20 70 |e_fp);. | p|
|00005ea0| 63 6c 6f 73 65 28 64 61 | 74 65 5f 66 70 29 3b 0a |close(da|te_fp);.|
|00005eb0| 20 20 20 20 20 20 20 20 | 66 70 72 69 6e 74 66 28 | |fprintf(|
|00005ec0| 6c 6f 67 5f 66 69 6c 65 | 5f 66 70 2c 20 22 53 74 |log_file|_fp, "St|
|00005ed0| 61 72 74 20 54 69 6d 65 | 3a 20 25 73 5c 6e 22 2c |art Time|: %s\n",|
|00005ee0| 20 64 61 74 65 29 3b 0a | 20 20 20 20 7d 0a 20 20 | date);.| }. |
|00005ef0| 20 20 66 70 72 69 6e 74 | 66 28 6c 6f 67 5f 66 69 | fprint|f(log_fi|
|00005f00| 6c 65 5f 66 70 2c 20 22 | 5c 74 6c 6f 63 61 6c 20 |le_fp, "|\tlocal |
|00005f10| 68 6f 73 74 20 3d 20 25 | 73 5c 6e 22 2c 20 6c 6f |host = %|s\n", lo|
|00005f20| 63 61 6c 5f 68 6f 73 74 | 29 3b 0a 20 20 20 20 66 |cal_host|);. f|
|00005f30| 70 72 69 6e 74 66 28 6c | 6f 67 5f 66 69 6c 65 5f |printf(l|og_file_|
|00005f40| 66 70 2c 20 22 5c 74 72 | 65 6d 6f 74 65 20 68 6f |fp, "\tr|emote ho|
|00005f50| 73 74 20 3d 20 25 73 5c | 6e 22 2c 20 72 65 6d 6f |st = %s\|n", remo|
|00005f60| 74 65 5f 68 6f 73 74 29 | 3b 0a 20 20 20 20 66 70 |te_host)|;. fp|
|00005f70| 72 69 6e 74 66 28 6c 6f | 67 5f 66 69 6c 65 5f 66 |rintf(lo|g_file_f|
|00005f80| 70 2c 20 22 5c 74 72 65 | 6d 6f 74 65 20 70 6f 72 |p, "\tre|mote por|
|00005f90| 74 20 3d 20 25 64 5c 6e | 22 2c 20 72 65 6d 6f 74 |t = %d\n|", remot|
|00005fa0| 65 5f 70 6f 72 74 29 3b | 0a 20 20 20 20 66 70 72 |e_port);|. fpr|
|00005fb0| 69 6e 74 66 28 6c 6f 67 | 5f 66 69 6c 65 5f 66 70 |intf(log|_file_fp|
|00005fc0| 2c 20 22 5c 74 6d 65 61 | 6e 20 69 6e 74 65 72 61 |, "\tmea|n intera|
|00005fd0| 72 72 69 76 61 6c 20 3d | 20 25 75 20 28 75 73 65 |rrival =| %u (use|
|00005fe0| 63 29 5c 6e 22 2c 20 6d | 65 61 6e 5f 69 6e 74 65 |c)\n", m|ean_inte|
|00005ff0| 72 61 72 72 69 76 61 6c | 29 3b 0a 20 20 20 20 66 |rarrival|);. f|
|00006000| 70 72 69 6e 74 66 28 6c | 6f 67 5f 66 69 6c 65 5f |printf(l|og_file_|
|00006010| 66 70 2c 20 22 5c 74 64 | 75 72 61 74 69 6f 6e 20 |fp, "\td|uration |
|00006020| 3d 20 25 6c 64 20 28 73 | 65 63 29 5c 6e 22 2c 20 |= %ld (s|ec)\n", |
|00006030| 64 75 72 61 74 69 6f 6e | 29 3b 0a 20 20 20 20 66 |duration|);. f|
|00006040| 70 72 69 6e 74 66 28 6c | 6f 67 5f 66 69 6c 65 5f |printf(l|og_file_|
|00006050| 66 70 2c 20 22 5c 6e 22 | 29 3b 0a 20 20 20 20 66 |fp, "\n"|);. f|
|00006060| 66 6c 75 73 68 28 6c 6f | 67 5f 66 69 6c 65 5f 66 |flush(lo|g_file_f|
|00006070| 70 29 3b 0a 0a 0a 20 20 | 20 20 2f 2a 0a 20 20 20 |p);... | /*. |
|00006080| 20 2a 2a 20 73 65 6e 64 | 20 70 61 63 6b 65 74 73 | ** send| packets|
|00006090| 20 28 66 6f 72 65 76 65 | 72 29 0a 20 20 20 20 2a | (foreve|r). *|
|000060a0| 2f 0a 20 20 20 20 73 65 | 6e 64 5f 74 6f 74 61 6c |/. se|nd_total|
|000060b0| 20 3d 20 30 3b 0a 20 20 | 20 20 67 65 74 74 69 6d | = 0;. | gettim|
|000060c0| 65 6f 66 64 61 79 28 26 | 6e 6f 77 2c 20 4e 55 4c |eofday(&|now, NUL|
|000060d0| 4c 29 3b 0a 20 20 20 20 | 73 74 61 72 74 74 69 6d |L);. |starttim|
|000060e0| 65 20 3d 20 6e 6f 77 3b | 0a 20 20 20 20 77 68 69 |e = now;|. whi|
|000060f0| 6c 65 20 28 6e 6f 77 2e | 74 76 5f 73 65 63 20 2d |le (now.|tv_sec -|
|00006100| 20 73 74 61 72 74 74 69 | 6d 65 2e 74 76 5f 73 65 | startti|me.tv_se|
|00006110| 63 20 3c 20 64 75 72 61 | 74 69 6f 6e 29 20 7b 0a |c < dura|tion) {.|
|00006120| 0a 20 20 20 20 20 20 2f | 2a 0a 20 20 20 20 20 20 |. /|*. |
|00006130| 2a 2a 20 73 65 6e 64 20 | 6e 65 78 74 20 55 44 50 |** send |next UDP|
|00006140| 20 70 61 63 6b 65 74 0a | 20 20 20 20 20 20 2a 2f | packet.| */|
|00006150| 0a 20 20 20 20 20 20 69 | 66 20 28 73 65 6e 64 74 |. i|f (sendt|
|00006160| 6f 28 73 2c 20 28 63 68 | 61 72 20 2a 29 4e 55 4c |o(s, (ch|ar *)NUL|
|00006170| 4c 2c 20 30 2c 20 30 2c | 20 0a 20 20 20 20 20 20 |L, 0, 0,| . |
|00006180| 20 20 28 73 74 72 75 63 | 74 20 73 6f 63 6b 61 64 | (struc|t sockad|
|00006190| 64 72 20 2a 29 26 73 69 | 6e 2c 20 73 69 7a 65 6f |dr *)&si|n, sizeo|
|000061a0| 66 28 73 69 6e 29 29 20 | 3c 20 30 29 20 7b 0a 20 |f(sin)) |< 0) {. |
|000061b0| 20 20 20 20 20 20 20 20 | 20 70 65 72 72 6f 72 28 | | perror(|
|000061c0| 22 67 65 6e 65 72 61 74 | 65 3a 20 73 65 6e 64 74 |"generat|e: sendt|
|000061d0| 6f 22 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 66 |o");. | f|
|000061e0| 70 72 69 6e 74 66 28 6c | 6f 67 5f 66 69 6c 65 5f |printf(l|og_file_|
|000061f0| 66 70 2c 20 22 73 65 6e | 64 74 6f 28 29 20 66 61 |fp, "sen|dto() fa|
|00006200| 69 6c 65 64 5c 6e 22 29 | 3b 0a 20 20 20 20 20 20 |iled\n")|;. |
|00006210| 20 20 20 20 65 78 69 74 | 28 31 29 3b 0a 20 20 20 | exit|(1);. |
|00006220| 20 20 20 7d 0a 20 20 20 | 20 20 20 73 65 6e 64 5f | }. | send_|
|00006230| 74 6f 74 61 6c 2b 2b 3b | 0a 0a 20 20 20 20 20 20 |total++;|.. |
|00006240| 2f 2a 0a 20 20 20 20 20 | 20 2a 2a 20 73 6c 65 65 |/*. | ** slee|
|00006250| 70 20 75 6e 74 69 6c 20 | 74 69 6d 65 20 74 6f 20 |p until |time to |
|00006260| 73 65 6e 64 20 6e 65 78 | 74 20 70 61 63 6b 65 74 |send nex|t packet|
|00006270| 0a 20 20 20 20 20 20 2a | 2f 0a 20 20 20 20 20 20 |. *|/. |
|00006280| 73 6c 65 65 70 5f 69 6e | 74 65 72 76 61 6c 2e 74 |sleep_in|terval.t|
|00006290| 76 5f 75 73 65 63 20 3d | 20 73 6c 65 65 70 5f 74 |v_usec =| sleep_t|
|000062a0| 69 6d 65 28 6d 65 61 6e | 5f 69 6e 74 65 72 61 72 |ime(mean|_interar|
|000062b0| 72 69 76 61 6c 29 3b 0a | 20 20 20 20 20 20 73 6c |rival);.| sl|
|000062c0| 65 65 70 5f 69 6e 74 65 | 72 76 61 6c 2e 74 76 5f |eep_inte|rval.tv_|
|000062d0| 73 65 63 20 3d 20 73 6c | 65 65 70 5f 69 6e 74 65 |sec = sl|eep_inte|
|000062e0| 72 76 61 6c 2e 74 76 5f | 75 73 65 63 20 2f 20 31 |rval.tv_|usec / 1|
|000062f0| 30 30 30 30 30 30 4c 3b | 0a 20 20 20 20 20 20 73 |000000L;|. s|
|00006300| 6c 65 65 70 5f 69 6e 74 | 65 72 76 61 6c 2e 74 76 |leep_int|erval.tv|
|00006310| 5f 75 73 65 63 20 3d 20 | 73 6c 65 65 70 5f 69 6e |_usec = |sleep_in|
|00006320| 74 65 72 76 61 6c 2e 74 | 76 5f 75 73 65 63 20 25 |terval.t|v_usec %|
|00006330| 20 31 30 30 30 30 30 30 | 4c 3b 0a 0a 20 20 20 20 | 1000000|L;.. |
|00006340| 20 20 69 66 20 28 76 65 | 72 62 6f 73 65 29 20 7b | if (ve|rbose) {|
|00006350| 0a 20 20 20 20 20 20 20 | 20 20 20 70 72 69 6e 74 |. | print|
|00006360| 66 28 22 73 6c 65 65 70 | 20 74 69 6d 65 20 3d 20 |f("sleep| time = |
|00006370| 25 75 3a 25 75 5c 6e 22 | 2c 20 73 6c 65 65 70 5f |%u:%u\n"|, sleep_|
|00006380| 69 6e 74 65 72 76 61 6c | 2e 74 76 5f 73 65 63 2c |interval|.tv_sec,|
|00006390| 20 73 6c 65 65 70 5f 69 | 6e 74 65 72 76 61 6c 2e | sleep_i|nterval.|
|000063a0| 74 76 5f 75 73 65 63 29 | 3b 0a 20 20 20 20 20 20 |tv_usec)|;. |
|000063b0| 7d 0a 20 20 20 20 20 20 | 20 73 65 6c 65 63 74 28 |}. | select(|
|000063c0| 30 2c 20 30 2c 20 30 2c | 20 30 2c 20 26 73 6c 65 |0, 0, 0,| 0, &sle|
|000063d0| 65 70 5f 69 6e 74 65 72 | 76 61 6c 29 3b 0a 20 20 |ep_inter|val);. |
|000063e0| 20 20 20 20 2f 2a 20 75 | 73 6c 65 65 70 28 73 6c | /* u|sleep(sl|
|000063f0| 65 65 70 5f 69 6e 74 65 | 72 76 61 6c 29 3b 20 73 |eep_inte|rval); s|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.